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
3 posts - 3 participants