JoakimL

Untitled

Nov 4th, 2023
810
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.67 KB | Software | 0 0
  1. - id: start_heating_toalett
  2.   alias: Start heating (scheduled) - toalett
  3.   trigger:
  4.  # Don't use 00 !!!
  5.     - platform: time_pattern
  6.       minutes: 0
  7.       id: "fullhour"
  8.     - platform: time_pattern
  9.       minutes: 15
  10.       id: "fullhour"
  11.     - platform: time_pattern
  12.       minutes: 30
  13.       id: "fullhour"
  14.     - platform: time_pattern
  15.       minutes: 45
  16.       id: "fullhour"
  17.   action:
  18.     - choose:
  19.         - conditions:
  20.             - condition: trigger
  21.               id: "fullhour"
  22.             - condition: template
  23.               value_template: >-
  24.                 {{ states('sensor.nordpool_kwh_se4_sek_2_095_025')|float(0) <=
  25.                    states('input_number.electricity_price_threshold_toalett')|float(0) }}
  26.             - condition: template
  27.               value_template: >-
  28.                 {{(today_at(states('input_datetime.high_temp_period_start_1_toalett')) <= now()
  29.                    and today_at(states('input_datetime.high_temp_period_end_1_toalett')) >= now())
  30.                 or (today_at(states('input_datetime.high_temp_period_start_2_toalett')) <= now()
  31.                     and today_at(states('input_datetime.high_temp_period_end_2_toalett')) >= now())
  32.                 or (today_at(states('input_datetime.high_temp_period_start_3_toalett')) <= now()
  33.                     and today_at(states('input_datetime.high_temp_period_end_3_toalett')) >= now())}}
  34.           sequence:
  35.             - service: climate.set_temperature
  36.               target:
  37.                 entity_id: climate.golvvarme_toalet_nere
  38.               data:
  39.                 temperature: " {{ states('input_number.temperatur_high_toalett') | float(1) }} "
  40.                 hvac_mode: heat
Advertisement
Add Comment
Please, Sign In to add comment