I have a wiz bulb and a Shelly gen3 WLAN 0-10V dimmer controlling fluorescent lamps.
I want to create an automation setting the brightness value of WIZ Lamp to the same value as the shelly-dimmer whenever the brightness of the Shelly dimmer changes.
After reading a ton of documentation I have still not fully understood the yaml syntax. How can a value be read from other entities?
It would depend on exactly how you’re interfacing with the lights. It could be as simple as creating a light group. But, if you’re allowing someone to manually change brightness of one light one via a physical switch or dial, and this must be a two-way sync, then it needs more effort.
Actually I want my family to be able to dim both lights just with the buttons wired to the shelly dimmer. And that is working now! Thanks guys.
Just grouping the lights doesn’t do that.
I used sed to replace the slashes in filepaths inside a shell-script, but the different braces and quotes in
brightness: "{{ state_attr(trigger.entity_id, 'brightness') | int }}"
just melt my brain. I would greatly appreciate a detailed dissection of that line.
And when to use 2 or 4 spaces indentation?
Significant whitspace or curly braces – YAML is combining the worst of both worlds.
You’re not alone in having trouble reading templates. I edited the original breakdown that I posted here out and I put a more complete breakdown in a community guide topic because I think it is useful for everyone. That topic is more up to date, so it is best to read it there. It is part of the Cookbook where you can find other topics you might be interested in or might like to contribute to.