Just to say this was exactly what I needed and has worked for me using my aqara switches, changing colours, using the aqara both clicks, on both kids milight gateways and aqara gateways. If it helps anyone else here are my yaml files.
I use this automation right now and it’s works nicely BUT, almost never coming “clear” colours , can I change this automation somehow or I must maid brand new automation for that ? something like that – every some minute coming specific colour ( green, red, blue, yellow, purple - etc.)
alias: I korrus esik Disco
trigger:
platform: time
seconds: ‘/30’
action:
service: light.turn_on
entity_id:
@anon43302295 my device is tasmotad Magic Home LED controller in ARilux LC01 Mode and seems that not supported “effect:” command - when I wrote to automatsion
- alias: Police
trigger:
- platform: state
entity_id: alarm_control_panel.house
to: 'triggered'
action:
service: light.turn_on
entity_id: group.all_lights
data_template:
brightness: 250
color_name: >
{% set colors = [‘red’, ‘yellow’, ‘blue’, ‘green’, ‘purple’] %}
{{ colors|random }}
Error loading /config/configuration.yaml: while scanning for the next token found character '%' that cannot start any token in "/config/automations/test.yaml", line 12, column 10
He mf, thanks for the reply, now it says there’s a coloring issue?
I am using a magichome RGB LED strips flashed with tasmota.
Best thing is to just set an effect on a light in an automation, but i cant figure out how to.
Invalid config for [automation]: invalid template (TemplateSyntaxError: unexpected char '‘' at 17) for dictionary value @ data['action'][0]['data_template']['color_name']. Got None. (See /config/configuration.yaml, line 169). Please check the docs at https://home-assistant.io/components/automation/
You’re such a bad ass! Thank you so much, couldn’t have spotted that in a hundred years!
Edit: This is a workaround for setting an effect on Tasmota Magic Home LED. By change you know how to let this loop for about a minute, it only changes once now… Cant seem to find any guides, saw another post of yours but not really apliccable in my case.
You want it to change colour every few seconds for a minute? If so, how random do you want it to be? Like does it always go red, yellow, blue, green, purple but just the start color is different each time? Or is the first colour based on something? Or do you just want a completely random colour every time?
Well it really doesnt matter, id like to use it in my alarm setup to draw attention so it just has to switch fast until the state of the alarm is disarmed, or as lomg as its triggered.
I tried the snippit from above followed by turn off an then copied that like 100 times, didnt work and ofcourse a nasty workaround.