Skip to content

Commit

Permalink
added F6-02-01 and F6-02-02 as sender eep for lights
Browse files Browse the repository at this point in the history
  • Loading branch information
grimmpp committed Mar 17, 2024
1 parent 62a4cc8 commit e9dc3dd
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 14 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ Elatko devices are exemplarily mentioned. You can find [here](https://www.eltako

**Supported sender EEPs**
* Light
* A5-38-08 (Central command - gateway, FUD14)
* A5-38-08 (Central command - gateway, FUD14) PREFERRED!!!
* F6-02-01 and F6-02-02 (Rocker switch - function 02 'direct pushbutton top on' default left) / (only as switch not for dimmable lights.)
* [Switch](https://github.com/grimmpp/home-assistant-eltako/tree/main/docs/rocker_switch/readme.md)
* F6-02-01 (Rocker switch)
* A5-38-08 (Central command) PREFERRED!!!
* F6-02-01 and F6-02-02 (Rocker switch - function 02 'direct pushbutton top on' default left)
* Cover
* H5-3F-7F (Eltako cover, FSB14)
* [Climate](https://github.com/grimmpp/home-assistant-eltako/tree/main/docs/heating-and-cooling/readme.md) (**Experimental** Feedback is welcome.)
Expand Down
14 changes: 8 additions & 6 deletions custom_components/eltako/light.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,13 @@ def turn_on(self, **kwargs: Any) -> None:

elif self._sender_eep in [F6_02_01, F6_02_02]:
address, discriminator = self._sender_id
# in PCT14 function 02 'direct pushbutton top on' needs to be configured
if discriminator == "left":
action = 0
action = 1 # 0x30
elif discriminator == "right":
action = 2
action = 3 # 0x70
else:
action = 0
action = 1

pressed_msg = F6_02_01(action, 1, 0, 0).encode_message(address)
self.send_message(pressed_msg)
Expand All @@ -219,12 +220,13 @@ def turn_off(self, **kwargs: Any) -> None:

elif self._sender_eep in [F6_02_01, F6_02_02]:
address, discriminator = self._sender_id
# in PCT14 function 02 'direct pushbutton top on' needs to be configured
if discriminator == "left":
action = 1
action = 0 # 0x10
elif discriminator == "right":
action = 3
action = 2 # 0x50
else:
action = 1
action = 0

pressed_msg = F6_02_01(action, 1, 0, 0).encode_message(address)
self.send_message(pressed_msg)
Expand Down
14 changes: 8 additions & 6 deletions custom_components/eltako/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,13 @@ def turn_on(self, **kwargs: Any) -> None:
address, discriminator = self._sender_id

if self._sender_eep in [F6_02_01, F6_02_02]:
# in PCT14 function 02 'direct pushbutton top on' needs to be configured
if discriminator == "left":
action = 0
action = 1 # 0x30
elif discriminator == "right":
action = 2
action = 3 # 0x70
else:
action = 0
action = 1

pressed_msg = F6_02_01(action, 1, 0, 0).encode_message(address)
self.send_message(pressed_msg)
Expand All @@ -111,12 +112,13 @@ def turn_off(self, **kwargs: Any) -> None:
address, discriminator = self._sender_id

if self._sender_eep in [F6_02_01, F6_02_02]:
# in PCT14 function 02 'direct pushbutton top on' needs to be configured
if discriminator == "left":
action = 1
action = 0 # 0x10
elif discriminator == "right":
action = 3
action = 2 # 0x50
else:
action = 1
action = 0

pressed_msg = F6_02_01(action, 1, 0, 0).encode_message(address)
self.send_message(pressed_msg)
Expand Down

0 comments on commit e9dc3dd

Please sign in to comment.