Open mak-gitdev opened 8 months ago
This issue might be related to some previously reported issues in the discussion panel: https://github.com/mak-gitdev/HA_enoceanmqtt/discussions/36#discussioncomment-4788409 https://github.com/mak-gitdev/HA_enoceanmqtt/discussions/36#discussioncomment-5688532 https://github.com/mak-gitdev/HA_enoceanmqtt/discussions/65
In fact the position reported from the EEP is 0 when the cover is open and 100 when the cover is closed. But HA expect 0 when the cover is closed and 100 when the cover is open.
The mapping below will be added to create a second cover entity to fix that:
- component: "cover"
name: "cover2"
config:
command_topic: "req"
payload_open: >-
{"CMD":"1","POS":"0","ANG":"127","REPO":"0","LOCK":"0","CHN":"0","send":"clear"}
payload_close: >-
{"CMD":"1","POS":"100","ANG":"127","REPO":"0","LOCK":"0","CHN":"0","send":"clear"}
payload_stop: >-
{"CMD":"2","CHN":"0","send":"clear"}
position_topic: "CMD4"
position_open: 0
position_closed: 100
position_template: "{{ value_json.POS }}"
set_position_topic: "req"
set_position_template: >-
{"CMD":"1","POS":"{{ 100 - position }}","ANG":"127","REPO":"0","LOCK":"0","CHN":"0","send":"clear"}
tilt_status_topic: "CMD4"
tilt_status_template: "{{ value_json.ANG }}"
tilt_command_topic: "req"
tilt_command_template: >-
{"CMD":"1","POS":"127","ANG":"{{ tilt_position }}","REPO":"0","LOCK":"0","CHN":"0","send":"clear"}
I won't replace the existing cover entity for the moment as it seems to work in some cases. I will recommend every users with that issue to migrate to use this cover2 entity instead of using custom mapping file.
Thanks! I confirm cover position is now correct with suggested cover2 code and NODON/ubiwiz rollershutter modules.
Discussed in https://github.com/mak-gitdev/HA_enoceanmqtt/discussions/93