I want to set global variables before my custom I2C takes action:
light:
- platform: monochromatic
name: "Kitchen Light 1"
id: "kl1"
output: custom_i2c_output
on_...:
- globals.set:
id: channel
value: '0x80'
on_...
- globals.set:
id: channel
value: '0x80'
This should happen on ON or OFF or Brightness change. .
on_turn_off becomes true only after the light has reached the finally state off. When the race is run without my globals.
I could not find the appropriate trigger. Is there a way to achive this?
Thankyou Christian