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

Help to use a attribute as trigger

$
0
0

I have a sensor for my electricity price for my home. I want to check the price level and if the price is high, I will turn off the heater to my Spa (small swimming pool).

One attribute in the sensor is called “price_level”. If state is_not “very_expencive” on pric level I want the heator to be on.

I have wrote this but it don´t work.

- alias: Spa
  trigger:
    - platform: template
      entity_id: sensor.electricity_price_rydbovagen_16
      value_template: "{{ not is_state('price_level', 'very_expencive') }}" # Heater and pump starts if attribute is_not "very_expencive"

  action:
    service: homeassistant.turn_on
    entity_id: 
         - switch.pump_spabad          # turn on pump and heater

Skärmklipp

3 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 106146

Trending Articles



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