Closed pdawg17 closed 6 months ago
Try explicitly converting the scores to type int and see if that solves it My guess is that it is comparing them as strings and in games where Warriors score 100+ and hold their opponents in the 90's as they have recently, the "9" > "1" and it hits the False criteria.
I think adding "(state_attr('sensor.warriors_basketball','team_score') | int) " will ensure it's of type int. You can use the Template tester in the Developer Tools section to confirm.
I have a HA automation set up:
alias: Warriors game result bulbs description: "" trigger:
For awhile now though, when the Warriors win, I still get the "else" result. I haven't changed the automation at all and it used to work correctly. Has any of the syntax changed for Team Tracker? Btw not sure why the code dashes are showing up differently once I update the comment...if anyone knows how to fix I'll edit...thanks..,