Sure, I made a custom effect with the colors I wanted in the hyperion backend. And then I use a shell command to call it in Home Assistant.
in configuration.yaml
shell_command:
hyperion_gpg: curl "http://192.168.0.231:8090/json-rpc" -X POST -d "{\"command\":\"effect\", \"effect\":{\"name\":\"Go Pack Go\"}, \"duration\":10000, \"priority\":1, \"origin\":\"Home Assistant\"}"
hyperion_stop_effect: curl "http://192.168.0.231:8090/json-rpc" -X POST -d "{\"command\":\"clear\", \"priority\":-1}"
and this is the automation (which also triggers a LIFX bulb and WLED strips)
- id: '1607306431209'
alias: NFL - Go Pack Go
trigger:
- platform: state
entity_id:
- sensor.nfl
attribute: team_score
condition:
- condition: state
entity_id: sensor.nfl
state: IN
- condition: template
value_template: '{{ (trigger.to_state.attributes.team_score | int) >= (trigger.from_state.attributes.team_score
| int + 1) }}'
- condition: template
value_template: '{{ (trigger.to_state.attributes.team_score | int) <= (trigger.from_state.attributes.team_score
| int + 6) }}'
action:
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 0
- data:
mode: strobe
brightness: 255
rgb_color:
- 3
- 171
- 0
period: 0.5
cycles: 20
target:
entity_id: light.lamp
action: lifx.effect_pulse
- data: {}
action: shell_command.hyperion_gpg
- type: turn_on
device_id: fbbc7b604f8cd4f13d8fbf1eb656d6de
entity_id: 9c7e3d05cf771f816a3974c19e823716
domain: light
brightness_pct: 100
- type: turn_on
device_id: e8b124eaae74dfc33158bc0bdfeaec57
entity_id: f6b2a26d93d1906a7b609cf2e5fbd7d0
domain: light
brightness_pct: 100
- device_id: ede6522057e1a6336b15b9c326292d2f
domain: select
entity_id: f27d7a8c72655fa2917c7ba3e94e819c
type: select_option
option: Go-Pack-Go
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- data: {}
action: shell_command.hyperion_stop_effect
- type: turn_off
device_id: fbbc7b604f8cd4f13d8fbf1eb656d6de
entity_id: 9c7e3d05cf771f816a3974c19e823716
domain: light
- type: turn_off
device_id: e8b124eaae74dfc33158bc0bdfeaec57
entity_id: f6b2a26d93d1906a7b609cf2e5fbd7d0
domain: light
- type: turn_off
device_id: ede6522057e1a6336b15b9c326292d2f
entity_id: 48a682787486ac0673a704168522e697
domain: light
mode: parallel
The first delay is set up in case the sensor is ahead of the broadcast. The second delay is so the effects terminate after 10 seconds. You can adjust the conditions so they only happen for touchdowns or field goals. They’re currently set so every point triggers the automation.
This is a version with the LIFX and WLED effects stripped out.
- id: '1607306431209'
alias: NFL - Go Pack Go
trigger:
- platform: state
entity_id:
- sensor.nfl
attribute: team_score
condition:
- condition: state
entity_id: sensor.nfl
state: IN
- condition: template
value_template: '{{ (trigger.to_state.attributes.team_score | int) >= (trigger.from_state.attributes.team_score
| int + 1) }}'
- condition: template
value_template: '{{ (trigger.to_state.attributes.team_score | int) <= (trigger.from_state.attributes.team_score
| int + 6) }}'
action:
- delay:
hours: 0
minutes: 0
seconds: 0
milliseconds: 0
- data: {}
action: shell_command.hyperion_gpg
- delay:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
- data: {}
action: shell_command.hyperion_stop_effect
mode: parallel