Open Sabbath92 opened 3 years ago
The error message you're seeing in your Home Assistant configuration log suggests that there is an issue with the input_label
component, and it's affecting the automation and template conditions in your configuration. Specifically, it appears that the input_label
entities for birthdays are not found or are not in the expected state.
Here are some steps you can take to address this issue:
Check input_label
Entities: Ensure that the input_label
entities for the birthdays you're tracking (e.g., richard_birthday
, nicholas_birthday
, etc.) are defined and correctly set up in your Home Assistant configuration. You may need to review your configuration and make sure these entities exist and have valid values.
Review Automation and Templates: Check your automation and template configurations related to these input_label
entities. It seems that your templates are trying to access the state
attribute of these entities, but if they don't exist or have incorrect values, it can lead to the "UndefinedError" you're seeing. Review and update your automation and template code accordingly.
Test Templates: You can use the Home Assistant Developer Tools Template Editor to test your templates and see if they return the expected values. This can help you identify any issues with your template code.
Home Assistant Core Version: You mentioned that this issue started after Core-2021.6. Sometimes, updates to Home Assistant can introduce breaking changes. Ensure that your configuration is compatible with the version you're using. It might require adjustments to work with the latest Home Assistant version.
Logs and Debugging: Enable debug logs to get more detailed information about the issue. This can help pinpoint the exact source of the problem.
Community Support: If you're unable to resolve the issue on your own, consider seeking help on the Home Assistant community forums or GitHub repository. Other Home Assistant users and developers may have encountered similar issues and can provide guidance.
Here's an example of how you can define an input_label
in your configuration.yaml file:
input_label:
richard_birthday:
name: Richard's Birthday
nicholas_birthday:
name: Nicholas's Birthday
# Add other birthdays here
Remember to check your entire configuration, including your automations and templates, to ensure they are set up correctly and are compatible with the version of Home Assistant you are using.
Birthday countdown stopped working after core-2021.6.
Here is the log from Check Home Assistant configuration.
Failed config homeassistant.packages.birthday.input_label:
Logs:
Logger: homeassistant.components.automation Source: components/automation/init.py:737 Integration: Automation (documentation, issues) First occurred: 9:30:59 AM (161 occurrences) Last logged: 9:55:00 PM
Error evaluating condition in 'Update Birthdays': In 'condition' (item 1 of 6): In 'template' condition: UndefinedError: 'None' has no attribute 'state' In 'condition' (item 2 of 6): In 'template' condition: UndefinedError: 'None' has no attribute 'state' In 'condition' (item 3 of 6): In 'template' condition: UndefinedError: 'None' has no attribute 'state' In 'condition' (item 4 of 6): In 'template' condition: UndefinedError: 'None' has no attribute 'state' In 'condition' (item 5 of 6): In 'template' condition: UndefinedError: 'None' has no attribute 'state' In 'condition' (item 6 of 6): In 'template' condition: UndefinedError: 'None' has no attribute 'state' Error evaluating condition in 'Random Birthday Wishes': In 'condition': In 'and' (item 2 of 2): In 'or' (item 1 of 6): In 'template' condition: UndefinedError: 'None' has no attribute 'state' In 'or' (item 2 of 6): In 'template' condition: UndefinedError: 'None' has no attribute 'state' In 'or' (item 3 of 6): In 'template' condition: UndefinedError: 'None' has no attribute 'state' In 'or' (item 4 of 6): In 'template' condition: UndefinedError: 'None' has no attribute 'state' In 'or' (item 5 of 6): In 'template' condition: UndefinedError: 'None' has no attribute 'state' In 'or' (item 6 of 6): In 'template' condition: UndefinedError: 'None' has no attribute 'state'
Logger: homeassistant.helpers.template Source: helpers/template.py:1377 First occurred: 9:30:49 AM (902 occurrences) Last logged: 9:55:00 PM
Template variable error: 'None' has no attribute 'state' when rendering '{{ states.input_label.richard_birthday.state.split('-') | length > 0 }}' Template variable error: 'None' has no attribute 'state' when rendering '{{ states.input_label.nicholas_birthday.state.split('-') | length > 0 }}' Template variable error: 'None' has no attribute 'state' when rendering '{{ states.input_label.kallea_birthday.state.split('-') | length > 0 }}' Template variable error: 'None' has no attribute 'state' when rendering '{{ states.input_label.dad_birthday.state.split('-') | length > 0 }}' Template variable error: 'None' has no attribute 'state' when rendering '{{ states.input_label.tot_birthday.state.split('-') | length > 0 }}'