I am new to HA and can’t figure out how to automate this thing. I copied some holiday light code from youtube which integrated well with HA. The light has multiple effects and I want to loop thru those say every 15 mins. Tried automation and scripts but nothing worked as expected. I am able to turn on the light but it always turn on to the last effect it had. Below is the configuration.yaml config for the light. Would appreciate any help you can provide. TIA!
configuration.yaml
#Already replaced [MQTT_CLIENT_ID] with LightMCU in actual config.
sensor:
- platform: mqtt
name: “Current LED”
state_topic: “[MQTT_CLIENT_ID]/locator”
light:
- platform: mqtt
name: “Holiday Lights”
command_topic: “[MQTT_CLIENT_ID]/power”
state_topic: “[MQTT_CLIENT_ID]/powerState”
brightness_command_topic: “[MQTT_CLIENT_ID]/brightness”
brightness_state_topic: “[MQTT_CLIENT_ID]/brightnessState”
brightness_scale: 255
white_value_command_topic: “[MQTT_CLIENT_ID]/modifier”
white_value_state_topic: “[MQTT_CLIENT_ID]/modifierState”
white_value_scale: 500
effect_command_topic: “[MQTT_CLIENT_ID]/effect”
effect_state_topic: “[MQTT_CLIENT_ID]/effectState”
effect_list:- Color_Chase
- Color_Glitter
- Single_Race
- Double_Crash
- Rainbow
- Blocked_Colors
- BPM
- Twinkle
- Fire
- Fill_Solid
- Spooky_Eyes
- LED_Locator
retain: true
- platform: mqtt
name: “Color 1”
command_topic: “[MQTT_CLIENT_ID]/ColorPower”
state_topic: “[MQTT_CLIENT_ID]/powerState”
rgb_command_topic: “[MQTT_CLIENT_ID]/color1”
rgb_state_topic: “[MQTT_CLIENT_ID]/color1State”
retain: true - platform: mqtt
name: “Color 2”
command_topic: “[MQTT_CLIENT_ID]/ColorPower”
state_topic: “[MQTT_CLIENT_ID]/powerState”
rgb_command_topic: “[MQTT_CLIENT_ID]/color2”
rgb_state_topic: “[MQTT_CLIENT_ID]/color2State”
retain: true - platform: mqtt
name: “Color 3”
command_topic: “[MQTT_CLIENT_ID]/ColorPower”
state_topic: “[MQTT_CLIENT_ID]/powerState”
rgb_command_topic: “[MQTT_CLIENT_ID]/color3”
rgb_state_topic: “[MQTT_CLIENT_ID]/color3State”
retain: true - platform: mqtt
name: “Glitter”
state_topic: “[MQTT_CLIENT_ID]/glitter/state”
command_topic: “[MQTT_CLIENT_ID]/addEffects”
payload_on: “Glitter On”
payload_off: “Glitter Off”
rgb_command_topic: “[MQTT_CLIENT_ID]/glitterColor”
rgb_state_topic: “[MQTT_CLIENT_ID]/glitterColorState”
white_value_command_topic: “[MQTT_CLIENT_ID]/glitterChance”
white_value_state_topic: “[MQTT_CLIENT_ID]/glitterChanceState”
white_value_scale: 255
retain: true - platform: mqtt
name: “Lightning”
state_topic: “[MQTT_CLIENT_ID]/lightning/state”
command_topic: “[MQTT_CLIENT_ID]/addEffects”
payload_on: “Lightning On”
payload_off: “Lightning Off”
white_value_command_topic: “[MQTT_CLIENT_ID]/lightningChance”
white_value_state_topic: “[MQTT_CLIENT_ID]/lightningChanceState”
white_value_scale: 500
retain: true