Skip to content

battery_notes_battery_threshold causes warning in logs #3934

@FRvanderVeen

Description

@FRvanderVeen

Checklist

  • I have added battery_notes: to my configuration.yaml and restarted.
  • I have read the FAQ's.
  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of any previous issues..

Battery Notes Version

latest

Describe the issue

In my homeassistant logs I see the following warning:
Error evaluating condition in 'Batterij laag notificatie': In 'condition' (item 1 of 3): In 'template' condition: TypeError: argument of type 'NoneType' is not iterable

I checked the blueprint:

conditions:
- condition: template
value_template: |-
{{ trigger.event.data.device_id not in excluded_devices}}
- condition: template
value_template: |-
{{ not include_devices_enabled or trigger.event.data.device_id in include_devices }}
- alias: User pick
condition: !input additional_conditions

If I compare included to excluded, I think the excluded template should check if excluded devices is enabled.

Reproduction steps

  1. Create an automation using the battery_notes_battery_threshold blueprint
  2. Make a device trigger the automation
  3. Check the logs of HA

System Health details

None

Debug logs


Diagnostics dump

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions