kbrown01 / SportStandingsScores

Sports Standings and Scores Sensors and Dashboard for Home Assistant
16 stars 2 forks source link

No live, pregame and, postgame tiles #5

Open deboy69 opened 6 months ago

deboy69 commented 6 months ago

Hello, tabs postgame, live and pregame show blank.

Any suggestions on how to get this to work? @kbrown01

What do you have for your decluttering-card template in ui-lovelace?

deboy69 commented 6 months ago

Lovelace-card had to be installed which is not a requirement on the list. Plus the required teamtracker dependency was broken and required developer fix with HA.

Working now.

bjh22 commented 4 months ago

Lovelace-card had to be installed which is not a requirement on the list. Plus the required teamtracker dependency was broken and required developer fix with HA.

Working now.

I am having the same issue. I can see standings but not live/post/pre games.

Can you explain in more detail what you needed to install/fix?

deboy69 commented 4 months ago

@bjh22 Think all I did was implement the new updates from the dev. I dont recall having to change anything. Make sure the lovelace-card is installed.

bjh22 commented 4 months ago

I did some debugging on my end - in dashboard.yaml there is a refernce to sensor.nfl_red_zone that I don't have, and I don't see it in sensor.yaml from the repo either. I removed the IF statement that contained this sensor and all is now well.

giuseppebaldi commented 1 month ago

I am having the same issue (I am using NHL only). Standings all work perfectly but Postgame, Live & Pregame show nothing. I have all the sensors set up and they all have the proper attributes (league, next game, etc). Starting Goalies is also messed up but seems that's a known issue. In my dashboard yaml I did also find the stray sensor.nfl_red_zone and removed that line but I still get nothing on those screens. I have 2 separate team trackers cards on another dashboard that work perfectly.

Any ideas what might cause this? I saw the above for the lovelace-card but couldn't find anything in HACS with that specific name (but a lot of cards with Lovelace in the name).

giuseppebaldi commented 1 month ago

From my logs, surely this is the issue but I have no idea what it means. TIA

Logger: homeassistant.helpers.event Source: helpers/template.py:578 First occurred: 10:56:27 AM (29 occurrences) Last logged: 11:37:36 AM

Error while processing template: Template<template=({%- for team in integration_entities("teamtracker") -%} {%- if state_attr(team, "league") == "NHL" -%} {%- if states(team) == "IN" -%} {%- if state_attr(team, "team_homeaway") == "home" -%} {{{"type": "custom:teamtracker-card", "entity": team, "card_mod": {"style": "ha-card {\n\n color: black; \n background-color: #ffcccc; \n box-shadow: 0 0 10px 5px red;\n}\n"}, "home_side": "right"}}}, {%- else -%} {{{"type": "custom:teamtracker-card", "entity": team, "home_side": "right"}}}, {%- endif -%} {%- endif -%} {%- endif -%} {%- endif -%} {%- endfor -%}) renders=30> Error while processing template: Template<template=({%- for team in integration_entities("teamtracker") -%} {%- if state_attr(team, "league") == "NHL" -%} {%- if states(team) == "PRE" -%} {%- if state_attr(team, "team_homeaway") == "home" -%} {{{"type": "custom:teamtracker-card", "entity": team, "card_mod": {"style": "ha-card {\n\n color: black; \n background-color: #ffcccc; \n box-shadow: 0 0 10px 5px red;\n}\n"}, "home_side": "right"}}}, {%- else -%} {{{"type": "custom:teamtracker-card", "entity": team, "home_side": "right"}}}, {%- endif -%} {%- endif -%} {%- endif -%} {%- endif -%} {%- endfor -%}) renders=34> Error while processing template: Template<template=({%- for team in integration_entities("teamtracker") -%} {%- if state_attr(team, "league") == "NHL" -%} {%- if states(team) == "POST" -%} {%- if state_attr(team, "team_homeaway") == "home" -%} {{{"type": "custom:teamtracker-card", "entity": team, "card_mod": {"style": "ha-card {\n\n color: black; \n background-color: #ffcccc; \n box-shadow: 0 0 10px 5px red;\n}\n"}, "home_side": "right"}}}, {%- else -%} {{{"type": "custom:teamtracker-card", "entity": team, "home_side": "right"}}}, {%- endif -%} {%- endif -%} {%- endif -%} {%- endif -%} {%- endfor -%}) renders=38> Error while processing template: Template<template=({%- for team in integration_entities("teamtracker") -%} {%- if state_attr(team, "league") == "NHL" -%} {%- if states(team) == "IN" -%} {%- if state_attr(team, "team_homeaway") == "home" -%} {{{"type": "custom:teamtracker-card", "entity": team, "card_mod": {"style": "ha-card {\n\n color: black; \n background-color: #ffcccc; \n box-shadow: 0 0 10px 5px red;\n}\n"}, "home_side": "right"}}}, {%- else -%} {{{"type": "custom:teamtracker-card", "entity": team, "home_side": "right"}}}, {%- endif -%} {%- endif -%} {%- endif -%} {%- endif -%} {%- endfor -%}) renders=34> Error while processing template: Template<template=({%- for team in integration_entities("teamtracker") -%} {%- if state_attr(team, "league") == "NHL" -%} {%- if states(team) == "PRE" -%} {%- if state_attr(team, "team_homeaway") == "home" -%} {{{"type": "custom:teamtracker-card", "entity": team, "card_mod": {"style": "ha-card {\n\n color: black; \n background-color: #ffcccc; \n box-shadow: 0 0 10px 5px red;\n}\n"}, "home_side": "right"}}}, {%- else -%} {{{"type": "custom:teamtracker-card", "entity": team, "home_side": "right"}}}, {%- endif -%} {%- endif -%} {%- endif -%} {%- endif -%} {%- endfor -%}) renders=38> Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 576, in ensure_valid self._compiled_code = self._env.compile(self.template) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 3206, in compile compiled = super().compile(source) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 768, in compile self.handle_exception(source=source_hint) File "/usr/local/lib/python3.12/site-packages/jinja2/environment.py", line 939, in handle_exception raise rewrite_traceback_stack(source=source) File "", line 16, in template jinja2.exceptions.TemplateSyntaxError: Encountered unknown tag 'endif'. Jinja was looking for the following tags: 'endfor' or 'else'. The innermost block that needs to be closed is 'for'.

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 749, in async_render_to_info render_info._result = self.async_render( # noqa: SLF001 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 626, in async_render compiled = self._compiled or self._ensure_compiled(limited, strict, log_fn) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 830, in _ensure_compiled self.ensure_valid() File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 578, in ensure_valid raise TemplateError(err) from err homeassistant.exceptions.TemplateError: TemplateSyntaxError: Encountered unknown tag 'endif'. Jinja was looking for the following tags: 'endfor' or 'else'. The innermost block that needs to be closed is 'for'.