Hey @JoeF
Glad you figured it out. I’m not super familiar with node red so couldn’t really help you out. If only using HASS automations then the following should have worked (substituting the action for your own):
Thank you @jayblackedout really appreciate your work and my 3 year old daughter loves it as well… …she starts dancing when she hears the horn and the strobe light goes on …
Any chance you have in the works something similar for soccer? I would love to have this work for the European Championship of soccer.
Thanks.
If they provide an API, I would be happy to collaborate on it with someone else. I no longer have the free time I did to be able to fully take on a new project.
Hi,
First of all, thanks for this integration
I wanted to know, how do you test it before a game while you are developping it, to make sure it will fire the event during a goal.
Thanks
Happy you like it! There’s unfortunately no real way to test it other than in real-time during a game. I can guarantee that the event will fire as soon as the NHL updates their API data with a goal though. You can test the “action” part of your automation by triggering it in the UI.
I’ve only used it in an automation, not a script so I can’t tell you for sure if that will work. The YAML is correct for the trigger of an automation though.
I am not sure what is going on, but over the past couple of weeks, my scores card has gone on the fritz. It was displaying the upcoming first game of the season, but now, I’m getting the game date/time, but the away and home teams are showing as ‘unknown’.
I can see that my sensor has the away_name and home_name correctly attributed. I can also pull the template out of my configuration and put it in the templates page in the developer tools and see that it reads the team names as expected.
I had this issue too. It has to do with the template sensors being rendered or initialized before the NHL integration is initialized. It also has to do with the way the template gathers its data. If you go to the configuration panel from the frontend and under server controls/general you reload the template section you’ll see the sensors update and show correctly, but the next time HA gets restarted you have the same issue. The fix is to change the templates to use the other way of getting the state of an object instead of direct. The other way cleanly handles if a state is invalid or unknown. Instead of using {{ states.sensor.blah.attribute.state }} it gets changed to {{ state_attr('sensor.blah', 'attribute') }}
Has anyone transitioned this from the legacy template to new template config? friendly_name_template is no longer accepted so I’m not sure what to do with those lines.
you’d need to check the object_id of this sensor after reloading, because it will be using the return of the name template, and you’d probably want it to use the ‘old’ object_id, which I’ve set as unique_id