Hi,
I want to dim two different lamps with one dimmer at the same time. The second lamp should get the brightness of the first lamp. The solution to dim both lamps with the new option “brightness_increase” or “brightness_decrease” at the same time is no option because sometimes they get different values.
My automation is this:
- id: '1583585245822'
alias: EG Flur HmIP-BSM_Dimmen_Dunkel
description: ''
trigger:
- event_data:
channel: 1
name: 00085A4990178F
param: PRESS_LONG
event_type: homematic.keypress
platform: event
condition: []
action:
- device_id: dc0b66f453714c4f9335ba568c1624f9
domain: light
entity_id: light.eg_flur_1
type: brightness_decrease
- service: light.turn_on
entity_id: light.eg_flur_2
data_template:
brightness: {{ state_attr('light.eg_flur_1 }}
The last “data_template” I think is not correct. Can someone tell me, what is the correct code?
Thanks a lot,
Jaques-Ludwig
any reason not to combine the lights?
light:
- platform: group
name: Flur 1 and 2
entities:
- light.eg_flur_1
- light.eg_flur_2
1 Like
As giygas said, a light group is a good solution for this. To answer your question though, this is what your template should be:
"{{ state_attr('light.eg_flur_1', 'brightness') | float }}"
I tested the group function. But the problem is, that sometime the lamps get different brightness. I think sometimes a lamp got the command for brightness and the other not. And with the solution of groups I don’t get them synchronized anymore.
Jaques-Ludwig
Are you using the entity created by the light group to control the brightness? If not, they won’t both receive the commands.
I use the light group that I createt with the deconz software (usb-stick dresden elektronik). That group was transfared to Home Assistant. That works ok, but not perfect, especially because not the hole time the both lamps get the same brightness.
What I have detected is, if I test it with the deconz software and change there the brightness, it works like a charm. Both lamps have every time the same brightness. Hmm…
Jaques-Ludwig