Hi all
probably I am missing something obvious but here it is.
I have the following automation which today at 05:45 the value was 13.8
- id: inpout time Morning Temperature for covers when sun and cold
alias: input Morning Temperature for covers when sun and cold
trigger:
- platform: time
at: '05:45:00'
action:
service: input_number.set_value
data:
value: "{{ states('sensor.outdoor_temperature_2') | float }}"
entity_id: input_number.temperature_for_covers
I have the following sensor which right now the it’s value is 8
- platform: template
sensors:
temp_diff_out_morning:
friendly_name: "temp diff outdoor morning for covers"
value_template: "{{states.sensor.outdoor_temperature_2.state|round|int-states.input_number.temperature_for_covers.state|round|int}}"
and the following trigger in my automation which is not working.
The idea is to first mark what is the outside temperature early in the morning
and if the outside temperature gets warmer (meaning its sunny) to open the covers in the living room.
But something in the below trigger is wrong and it is not triggering the automation.
Any ideas what is wrong?
- id: Open Covers in winter
trigger:
platform: numeric_state
entity_id: sensor.temp_diff_out_morning
value_template: "{{states.sensor.outdoor_temperature_2.state|round|int-states.input_number.temperature_for_covers.state|round|int}}"
above: 1
condition:
- condition: or
conditions:
- condition: state
entity_id:
- cover.50758014840d8e91f4fd
- cover.50758014840d8e91f036
state: 'unknown'
- condition: state
entity_id:
- cover.50758014840d8e91f4fd
- cover.50758014840d8e91f036
state: 'closing'
- condition: state
entity_id:
- cover.50758014840d8e91f4fd
- cover.50758014840d8e91f036
state: 'open'
- condition: time
after: '06:00:00'
before: '10:30:00'
- condition: state
entity_id: alarm_control_panel.mqtt_alarm
state: "disarmed"
- "{{ trigger.for.seconds == 1 * 60 and now().month in [1, 2, 3, 4, 5, 10, 11, 12] }}"
action:
- service: cover.open_cover
entity_id:
- cover.50758014840d8e91f4fd # main window
- cover.50758014840d8e91f036 # erker
- service: input_number.set_value
data:
value: "-20"
entity_id: input_number.temperature_for_covers