Skip to content

Commit

Permalink
Merge pull request #918 from hplato/master
Browse files Browse the repository at this point in the history
GarageDoor and mqtt cover
  • Loading branch information
hplato authored Oct 20, 2024
2 parents 28a545d + 1cbf0d8 commit efdc591
Show file tree
Hide file tree
Showing 2 changed files with 1,703 additions and 1,685 deletions.
5 changes: 5 additions & 0 deletions lib/GarageDoor_Item.pm
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,17 @@ sub new {
$self->{control} = 0;
$self->{sensor1} = 0;
$self->{sensor2} = 0;
$self->{debug} = 0;
#Add in a few data elements to make creating a MQTT for HA integration easier
$self->{mqttlocalitem}->{base_type} = 'cover';
$self->{mqttlocalitem}->{device_class} = 'garage';

$self->{map}->{sensor1}->{open} = "open";
$self->{map}->{sensor1}->{closed} = "closed";
$self->{map}->{sensor2}->{open} = "open";
$self->{map}->{sensor2}->{closed} = "closed";
$self->{map}->{control}->{on} = "on";

@{ $$self{states} } = ( 'open', 'closed' );

if (defined $control) {
Expand Down
Loading

0 comments on commit efdc591

Please sign in to comment.