#------------------------------------------- # Setting up some fun flash lights if anyone scores in the superbowl. Will need to update the sensors each year though. # @CCOSTAN # Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig # https://github.com/CCOSTAN/Home-AssistantConfig/issues/1502# #------------------------------------------- automation: - alias: 'Super Bowl Team Score Change' id: 5b3a4c89-1234-4567-8901-23456789abcd mode: single trigger: - platform: state entity_id: sensor.team_tracker_kc attribute: team_score - platform: state entity_id: sensor.team_tracker_phi attribute: team_score condition: - condition: template value_template: "{{ now().month == 2 }}" action: - service: input_boolean.turn_on target: entity_id: input_boolean.flash - service: light.turn_on target: entity_id: - light.outdoor_front_lights - light.living_room_accents - light.m1_back_left - light.m1_back_right - light.m1_front_left - light.m1_front_right - light.main_slider data: rgb_color: > {% if trigger.entity_id == 'sensor.team_tracker_phi' %} [0, 255, 0] {% else %} [255, 0, 0] {% endif %} brightness: 255 - delay: minutes: 5 - service: light.turn_on target: entity_id: - light.m1_back_left - light.m1_back_right data: brightness: 255 rgb_color: [255, 255, 255] - alias: 'Super Bowl Winner Celebration' id: 5b3a4c89-1234-4567-8901-23456789abce mode: single trigger: - platform: state entity_id: - sensor.team_tracker_kc - sensor.team_tracker_phi attribute: team_winner to: 'true' condition: - condition: template value_template: "{{ now().month == 2 }}" action: - service: light.turn_on target: entity_id: - light.outdoor_front_lights - light.living_room_accents - light.m1_back_left - light.m1_back_right - light.m1_front_left - light.m1_front_right - light.main_slider data: rgb_color: > {% if trigger.entity_id == 'sensor.team_tracker_phi' %} [0, 255, 0] {% else %} [255, 0, 0] {% endif %} brightness: 255 effect: 'colorloop' - delay: minutes: 3 - service: light.turn_on target: entity_id: - light.outdoor_front_lights - light.living_room_accents - light.m1_back_left - light.m1_back_right - light.m1_front_left - light.m1_front_right - light.main_slider data: rgb_color: > {% if trigger.entity_id == 'sensor.team_tracker_phi' %} [0, 255, 0] {% else %} [255, 0, 0] {% endif %} brightness: 255 effect: 'none'