Hello
First: very nice Work @Aircoookie
I like to do the same, but i have no experience with HTTP API. I tried this with out luck:
rest_command:
wled_sofa:
url: http://192.168.178.121/json/state
method: POST
payload: '{"on":true,"bri":20,"seg":[{"id":0,"start":0,"stop":91,"len":91,"grp":1,"spc":0,"on":true,"bri":20,"col":[[255,0,0],[0,0,0],[0,0,255]],"fx":58,"sx":154,"ix":84,"pal":2,"sel":true,"rev":false},{"id":1,"start":91,"stop":181,"len":90,"grp":1,"spc":0,"on":true,"bri":20,"col":[[8,255,0],[0,0,0],[0,0,255]],"fx":58,"sx":154,"ix":84,"pal":2,"sel":false,"rev":false}]}'
and under autmation.yaml:
- alias: 'wled_sofa_special'
trigger:
platform: blabla
action:
- service: rest_command.wled_sofa
data:
url: http://192.168.178.121/json/state
method: POST
payload: '{"on":true,"bri":20,"seg":[{"id":0,"start":0,"stop":91,"len":91,"grp":1,"spc":0,"on":true,"bri":20,"col":[[255,0,0],[0,0,0],[0,0,255]],"fx":58,"sx":154,"ix":84,"pal":2,"sel":true,"rev":false},{"id":1,"start":91,"stop":181,"len":90,"grp":1,"spc":0,"on":true,"bri":20,"col":[[8,255,0],[0,0,0],[0,0,255]],"fx":58,"sx":154,"ix":84,"pal":2,"sel":false,"rev":false}]}'
When I start the automation, it works. But the home-assistant wled-integration dosn’t work any more (all light changes go back after 1 sec.).
Can somebody help me?
Thanks!