Closed dredwater closed 2 years ago
You can already trigger an automation w/ a score change.
Here is mine for a touchdown, but you could do it for any score change if you wanted to...
alias: Automation - OSU Touchdown
description: ""
trigger:
- platform: state
entity_id: sensor.football_buckeyes
attribute: team_score
condition:
- condition: template
value_template: >-
{{ trigger.to_state.attributes.team_score | int >
(trigger.from_state.attributes.team_score | int + 5) }}
action:
your-action-here
This is awesome. Suggest to add this code snippet or info into the Readme. Thanks!
Added feature request to fire an event when home or opponent team score. The NHL integration (https://github.com/JayBlackedOut/hass-nhlapi) has it and it makes it really easy to setup an automation when score change. Thanks!