Hi!
Ive been useing HA for a while now, and this forum have been to a greate help.
I have a switch that turs my car heater on and off, now i wanna make that automatic.
I would like it to turn on every weekday:
If its less then 2C outside, then turn it on at 06:30:00
If its less then -2C outside, then turn it on 05:00:00
Then turn it off at 07:45:00.
I have been trying to get this to work, but cant really find the perfect script for it. Anyone have done this before?
You would want to have 2 automations.
- Trigger on 06:30:00 with condition for temperature on outside <= 2C (either your own sensor or an API there are lots of those in the component) and the action to turn on your car heater. (Doesen’t hurt even if it’s already on but could add a condition that it should not be turned on already)
- Trigger on 05:00:00 with condition for temperature on outside <= -2C (either your own sensor or an API there are lots of those in the component) and the action to turn on your car heater.
~Cheers
Hi
Yes, thats how i did try to do the automation.
But i just did get an error.
Do you have any exempel?
There are lots of examples all over this forum and in the cookbooks. If you want help with your specific configuration post it here (please use preformatted code) with the error your getting.
~Cheers
Hi!
I did get it to work on the temp for 2C or less, Just for makeing it more smarter i will try to get the heater to start depending on what temp it is outside. No big deal relly, but would be cool.
I should be able to make that in 1 automation? Or do i need to make more then one?
I havent researched if i can do a delay option in the automation? If then i would like to make a 3h delay that turns the heater off.
This is what I got this far:
- alias: 'Rule 017 - Turn on car heater at 05:00 [mon-fri, temp<2C]'
initial_state: True
hide_entity: False
trigger:
platform: time
after: "05:00:00"
condition:
condition: and
conditions:
- condition: numeric_state
entity_id: sensor.owm_temperature
below: 2.0
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
action:
service: homeassistant.turn_on
entity_id: switch.motorvarmare
I havent been able to try it yet but i think something like this should work
action:
- service: homeassistant.turn_on
entity_id: switch.motorvarmare
- delay: '03:00:00'
- service: switch.turn_off
entity_id: switch.motorvarmare
You would need multiple automations. I don’t know if delay is supported in automations but in scripts it is so you could just use a script instead of the homeassistant.turn_on which does everything. Maybe you could even squeeze it into one automation if you used a template condition. I did not use time triggers until now so I am not too sure what would be the best way to go.
~Cheers