Hue Tap Switch - Zigbee2MQTT
Closed this issue · 1 comments
Hi,
Rcently changed over to Z2M and was wondering how I can get it to work with the tap switch.
Here is what I have currently:
Here is what HA see's when I listen:
It's basically just:
event_type: state_changed
data:
entity_id: sensor.living_ room tap_switch_action
old state:
entity_id: sensor. living_room_tap_switch_action
state: press 1 attributes:
Hi @oneseventhree, this event sensor cannot link to the 'state_changed' event. It's an explicit limitation in
When any HA entity changes state, including this sensor, a 'state_changed' event is emitted. So, apart from the magnitude problem (there are too many state-changed events), there is also a potential infinite loop problem, as the sensor would trigger after its state change AGAIN and again.
As I understand, with Z2M, you already have 'states' for the switches, right? so you don't need to listen to events, just reformat some entities to show attributes as states, isn't it?
Closing this one 👍