Skip to content

Commit

Permalink
Merge pull request #520 from krkeegan/fix_511
Browse files Browse the repository at this point in the history
Reverse Dusk/Dawn Signal
  • Loading branch information
krkeegan authored Sep 7, 2023
2 parents 741e2b9 + 84fc96f commit bcd34c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion insteon_mqtt/device/Motion.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def handle_dawn(self, msg):
# Send True for dawn, False for dusk.
LOG.info("Motion %s broadcast grp: %s cmd %s", self.addr,
msg.group, msg.cmd1)
self.signal_dawn.emit(self, msg.cmd1 == Msg.CmdType.ON)
self.signal_dawn.emit(self, msg.cmd1 == Msg.CmdType.OFF)

#-----------------------------------------------------------------------
def update_flags(self, on_done=None, **kwargs):
Expand Down
4 changes: 2 additions & 2 deletions tests/device/test_MotionDev.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ def test_handle_broadcast_state(self, test_device, group_num, cmd1, cmd2, expect
mocked.assert_not_called()

@pytest.mark.parametrize("group_num,cmd1,cmd2,expected", [
(0x02,Msg.CmdType.ON, 0x00,[True]),
(0x02,Msg.CmdType.OFF, 0x00, [False]),
(0x02,Msg.CmdType.ON, 0x00,[False]),
(0x02,Msg.CmdType.OFF, 0x00, [True]),
(0x03,Msg.CmdType.ON, 0x00,[True]),
(0x03,Msg.CmdType.OFF, 0x00, [False]),
(0x04,Msg.CmdType.ON, 0x00,[True]),
Expand Down

0 comments on commit bcd34c0

Please sign in to comment.