Closed gharl77 closed 6 months ago
When an MLB game goes to POST, the team_winner and opponent_winner attributes update correctly to their true/false values in developer tools/states, however, the team_winner attribute remains null in HA. Automations won't fire on attribute change and displaying team_winner in a tile card still shows it to be null in spite of the correct value being in developer tools/states. It appears that opponent_winner works correctly.
@TomFrank19087 I am not sure I understand what you are saying. What do you mean it remains null in HA?
In the teamtracker_card I use team_winner to brighten the score if True and that's working for me. If it was null, it would be dimly displayed so I'm not sure what you are seeing. I don't have any triggers based on team_winner but will try to test one soon.
Anything more specific would be helpful.
@gharl77 The sensor fills in all attributes provided by the ESPN API. What attributes are you expecting that are null?
When the game goes to post, the two winner attributes are the correct true/false values corresponding to the game outcome on the States page of Developer tools. Nonetheless, my automation wasn't firing as expected. The teamtracker_card does correctly bold the winning score. To investigate, I added the following cards: - type: horizontal-stack cards: - type: tile entity: sensor.phillies state_content: - team_name - team_winner - team_score name: ' ' - type: tile entity: sensor.phillies state_content: - opponent_name - opponent_winner - opponent_score name: ' ' I've monitored both a win and a loss. Pre-game and in-game, these cards correctly display both team names, a hyphen (null winner), and the respective team score. Once the game goes post, the winning side correctly updates the hyphen to "true" but the losing side remains a hyphen and does not update to "false". I was using a false test in a portion of my automation and I believe that is why my automation was failing. I tried using the winner attribute as a trigger and as a condition when triggered by IN->POST. I've updated my automation to only test for true conditions and will test during this evenings game. Basically, I'm trying to flash some bulbs the winning team colors at the end of the game. Flashing both team colors at the start and the appropriate colors when a team scores works fine. Thank you. On 5/18/2024 8:45:04 AM, David @.> wrote: @TomFrank19087 [https://github.com/TomFrank19087] I am not sure I understand what you are saying. What do you mean it remains null in HA? In the teamtracker_card I use team_winner to brighten the score if True and that's working for me. If it was null, it would be dimly displayed so I'm not sure what you are seeing. I don't have any triggers based on team_winner but will try to test one soon. Anything more specific would be helpful. — Reply to this email directly, view it on GitHub [https://github.com/vasqued2/ha-teamtracker/issues/146#issuecomment-2118812930], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AL3VU4Q3THLIZWHGKE7Y44TZC5ENBAVCNFSM6AAAAABGQ5ICECVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJYHAYTEOJTGA]. You are receiving this because you were mentioned.Message ID: @.>
My guess is that through all the translations across the layers, Null and False end up both being turned into a value of zero. You would probably need to check for a status of POST along with the Winner field being False to know the game was over and they lost.
I've gone back to triggering on IN->POST but testing the Winner fields for True to determine which team won. It worked properly last evening. The two tile cards were as before, true for the winner and nothing for the loser. Looks like testing for False is what was failing. Thanks again. On 5/19/2024 11:02:00 AM, David @.> wrote: My guess is that through all the translations across the layers, Null and False end up both being turned into a value of zero. You would probably need to check for a status of POST along with the Winner field being False to know the game was over and they lost. — Reply to this email directly, view it on GitHub [https://github.com/vasqued2/ha-teamtracker/issues/146#issuecomment-2119267213], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AL3VU4RSLMTIGOWVWJXTKETZDC5GPAVCNFSM6AAAAABGQ5ICECVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJZGI3DOMRRGM]. You are receiving this because you were mentioned.Message ID: @.>
Some MLB games informations remain to null and no information is reported.
Example: