chunkysteveo / OpenEPaperLink-HA-Weatherman

Wetherman EPaper display using OpenEPaperLink and the HA Integration
37 stars 4 forks source link

"Template rendered invalid entity IDs" when multiple weather providers are present #35

Closed CrazyCoder closed 1 month ago

CrazyCoder commented 1 month ago

I finally updated from the hardcoded weather.home to the new template:

      variables:
        forecast_entity: >
         {%- for state in states | selectattr('domain','equalto','weather')   %}
         {{  state.entity_id }}
         {%- endfor -%}

On my system, with two ecobee thermostats, this code returns three entities, and I get the following error in the logs:

Logger: homeassistant.helpers.script.trigger_update_coordinator
Source: helpers/script.py:2026
First occurred: 08:15:00 (7 occurrences)
Last logged: 09:45:00

Trigger Update Coordinator: Error executing script. Error for call_service at pos 1: Template rendered invalid entity IDs: weather.first_floor weather.second_floor weather.home
chunkysteveo commented 1 month ago

You'll need to hard code the single "weather. " entity that matches your met.no weather integration.

CrazyCoder commented 1 month ago

Yes, that's what I did when I got this error. Would be nice to get it fixed or documented, though.

  - trigger:
      platform: time_pattern
      minutes: "/15"
      variables:
        forecast_entity: >
          {{ 'weather.home' }}
chunkysteveo commented 1 month ago

It's already in the docs to advise to hard code the variable if you have more than one weather entity:

https://github.com/chunkysteveo/OpenEPaperLink-HA-Weatherman?tab=readme-ov-file#sensorsintegrations-needed

CrazyCoder commented 1 month ago

Thanks, missed that.