-
-
Notifications
You must be signed in to change notification settings - Fork 28.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nested trigger based templated is unavailable #70036
Comments
template documentation |
Hey there @PhracturedBlue, @tetienne, @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration ( |
same seems to happen for:
or without self referencing:
which is correctly created at startup, but turns unknown on reloading template entities. Even a manual update entity doesn't change the sate of the icon correctly, so why is this different from event homeassistant start? |
core 2022.04.7 I am experiencing a similar issue with trigger-based template sensors. Whenever there is a templated attribute that references the sensor's state, the state returns "unavailable" and all attributes except template:
- trigger:
- platform: homeassistant
event: start
- platform: event
event_type: event_template_reloaded
sensor:
- name: "New Years Day"
state: >
{%- set today = now().date() %}
{% set new_years = today.replace(month=1, day=1) %}
{% if new_years < now().date() %}
{% set new_years = today.replace(month=1, day=1, year= (now().year + 1)) %}
{% endif %}
{{ strptime(new_years, "%y-%m-%d") }}
attributes:
trash_holiday: "off"
days_until: >
{{ ((states('sensor.new_years_day')|as_datetime|as_local).date() - now().date()).days }} The state and all attributes work normally when configured as a state-based sensor.
|
core 2022.05.1 Update: The issue also occurs when using the new |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
The problem
as title
What version of Home Assistant Core has the issue?
2022.5.0.dev20220414
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
template
Link to integration documentation on our website
https://next.home-assistant.io/integrations/template/#trigger-based-template-sensors
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
No response
Additional information
more-info shows dots
using:
does work correctly:
more-info:
The text was updated successfully, but these errors were encountered: