I have been flowing the MQTT JSON LED Pourch Light example by Bruh, I have got my LED strip to work and have it using MQTT i can switch it on and off and i have managed to turn the lights red…,
I am trying to make 3 automation to turn the LEDs red, green and yellow on a trigger, the trigger will be a google calendar entry. I am going to install the lights in my home office so that the family know if they can entre based on how important the work i am doing is. At the moment I am trying to trigger the LED colour change manually to check the system. I started with the red code and it worked my LEDs are now red, so i added the green code and now i get a configuration error and I can’t change the colour of the lights as i don’t get the switch on the ‘overview page’. the error I get is “Error loading /config/configuration.yaml: mapping values are not allowed here. ( it did work first time) in “/config/configuration.yaml”, line 90, column 12” .It is the “action:” line in the first automation. Can any one point me in the right direction this is my first build… I wont lie I am very happy to of got this far
Thanks in advance.
‘’’'light:
- platform: mqtt_json
name: “Porch Strip”
state_topic: “bruh/porch”
command_topic: “bruh/porch/set”
brightness: true
rgb: true
optimistic: false
qos: 0
automation:
- alias: “Strip LED Red”
initial_state: False
hide_entity: False
action:- service: mqtt.publish
data_template:
topic: “bruh/porch/set”
payload: ‘{
“state”: “ON”,
“brightness”: 120,
“color”: {
“r”: 255,
“g”: 0,
“b”: 00
},
“transition”: 1
}’
- service: mqtt.publish
- alias: “Strip LED Green”
initial_state: False
hide_entity: False
action:- service: mqtt.publish
data_template:
topic: “bruh/porch/set”
payload: ‘{
“state”: “ON”,
“brightness”: 120,
“color”: {
“r”: 0,
“g”: 255,
“b”: 0
},
“transition”: 1
}’
- service: mqtt.publish
- alias: “Strip LED Yellow”
initial_state: False
hide_entity: False
action:- service: mqtt.publish
data_template:
topic: “bruh/porch/set”
payload: ‘{
“state”: “ON”,
“brightness”: 120,
“color”: {
“r”: 255,
“g”: 255,
“b”: 0
},
“transition”: 1
}’
- service: mqtt.publish