N00B here,
I am trying to fire off an automation that turns on the truck engine heater switch from 6:00 a.m. to 8:00 p.m. if the temperature is 40 or below. The automation works if run manually. The automation was done in the GUI.
I have tried it two different ways and neither seems to work. My efforts are below and any help is appreciated -
alias: New automation
description: >-
Turns on the truck engine heater switch from 6:00 a.m. to 8:00 p.m. if the
temperature is 40 or below.
trigger:
- platform: template
value_template: “{{ states(‘sensor.my_weather_station_temperature’) < 40 }}”
condition: - condition: time
after: “06:00:00”
before: “20:00:00”
weekday:- mon
- tue
- wed
- thu
- fri
- sat
- sun
action:
- service: switch.turn_on
metadata: {}
data: {}
target:
area_id: garage
device_id: 0f0f739387cae829e9ecb84d3c261d56 - service: notify.me_gmail_com
metadata: {}
data:
message: The truck engine heater is on. DONT FORGET TO UNPLUG THE CORD!
target: [email protected]
title: F250
mode: single
alias: Truck Engine Heater On - 6:00 a.m. to 8:00 p.m.
description: >-
Turns on the truck engine heater switch from 6:00 a.m. to 8:00 p.m. if the
temperature is 40 or below.
trigger:
- platform: numeric_state
entity_id:- sensor.my_weather_station_temperature
attribute: current_temperature
below: 41
for:
minutes: 5
- sensor.my_weather_station_temperature
- platform: numeric_state
entity_id:- sensor.my_weather_station_temperature
for:
hours: 0
minutes: 5
seconds: 0
attribute: current_temperature
below: 40
above: -10
condition:
- sensor.my_weather_station_temperature
- condition: time
after: “06:00:00”
before: “20:00:00”
weekday:- mon
- tue
- wed
- thu
- fri
- sat
- sun
action:
- service: switch.turn_on
metadata: {}
data: {}
target:
area_id: garage
device_id: 0f0f739387cae829e9ecb84d3c261d56 - service: notify.me_gmail_com
metadata: {}
data:
message: The truck engine heater is on. DONT FORGET TO UNPLUG THE CORD!
target: [email protected]
title: F250
mode: single