Hello together,
i have a dimm actor for dimming lights in a room. Now i have replaced the existing lamp with a Philips Hue lamp. This philips Hue lamp has its own entitiy within hass. Now, i have the possibility to switch on the light with my dimm actor, and switch also the light with the Hue entity. But if the dimm actor is is off, the hue entity will not work. But this is normal, because if the main switch is off, the light have no power .
Ok, but now, i want to sync the two entities. If i turn on the lights with the dimm actor, also the hue entitiy should be turned on and vice versa, if i turn on the hue entiy, the wall mounted dimm actor shall switch on the lights. In a further step, also dimming should be possible this way.
Because i am in the beginning with automations under hass, i do not really now what to do. Perhaps somebody of you could help me here? The following configuration is my first try, but it isn’t working:
- alias: Hue Entity auf Schalter ĂĽbertragen
trigger:
platform: state
entity_id: light.hue_light
action:
- service: state
data_template:
entity_id:
- light.dimmer_deckenlicht
state: '{{ trigger.to_state.state }}'
brightness: '{{ states.light.hue_light.attributes.brightness }}'
- alias: Dimmer auf Hue Licht ĂĽbertragen
trigger:
platform: state
entity_id: light.dimmer_deckenlicht
action:
- service: state
data_template:
entity_id:
- light.hue_light
state: '{{ trigger.to_state.state }}'
brightness: '{{ states.light.dimmer_deckenlicht.brightness }}'
I will get an error in the log file:
(MainThread) [homeassistant.config] Invalid config for [automation]: Service state does not match format <domain>.<name> for dictionary value @ data['action'][0]['service']. Got None. (See /home/homeassistant/.homeassistant/configuration.yaml, line 74). Please check the docs at https://home-assistant.io/components/automation/
(MainThread) [homeassistant.config] Invalid config for [automation]: Service state does not match format <domain>.<name> for dictionary value @ data['action'][0]['service']. Got None. (See /home/homeassistant/.homeassistant/configuration.yaml, line 74). Please check the docs at https://home-assistant.io/components/automation/
Thank you very much and regards
danyo