Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 102449

Automation trigger on a templated entity - is there a way?

$
0
0

@klogg wrote:

Background

I use weather info in my garden irrigation package and I’d like to be able to change the weather data provider on the fly.

Question

I am well able to write everything in the package to adjust itself based on which from a variety of sensors has been selected through the package’s Lovelace UI…

…except for automations that need to be triggered on a state change of that sensor.

e.g.

    trigger:
      - platform: state
        entity_id:
          - sensor.dark_sky_daytime_high_temperature_0d

What I’d like to achieve is something like this which obviously won’t work, but is there a technique someone knows that can achieve this?

    trigger:
      - platform: state
        entity_id:
          - {{ states('input_text.weather_provider') }}

The state of input_text.weather_provider would, to match the original example above be, ‘sensor.dark_sky_daytime_high_temperature_0d’.

I’m well aware the answer is likely to be ‘no’, but it is usually worth asking!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 102449

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>