Hi,
I’ve not been able to find a solution for this.
I have 6 fans which are handled by one call-service.
On a double tap, I would like to send a Mqtt message based on the entity. The topic path would include the entity.
For example for the den fan, the topic sent would be:
homeassistant/fan/den/set
I could copy this for each entity, 6 fans total, but I’m trying to reduce yaml code
- entities:
- fan.master_bed_room_fan
- fan.south_bed_room_fan
- fan.north_bed_room_fan
- fan.living_fan
- fan.sun_fan
- fan.den_fan
double_tap_action:
action: call-service
service: mqtt.publish
target: {}
data:
topic: homeassistant/fan/<set based on entity>/set
payload: '{"disable": "yes"}'
tap_action:
action: call-service
......
......