I’m not able to get my climate automation to work on my Tesla. I get the automation part to trigger correctly, but it does not enable the climate module correctly. Also the built in Tesla component and climate part works fine isolated from my automation efforts.
The climate entity :
climate.tesla_model_s_5yjsa7e26gf120793_hvac_climate_system
state:
off
Attributes:
operation_list: on,off
operation_mode: off
+++
The problem is that setting the operation_mode to ‘on’, does not make the climate entity to enable the heating / ventilation on the Tesla API. Also verified with tcpdump that enabling the operation_mode does not trigger any communication with the Tesla API.
Will also look into enhancing this with adjusting pre-heat time based on outside temperature, but will need the basics to work first
I’m also having issues with Tesla hvac automation. In my case, the automation successfully turns on the hvac but only if I have recently used the Tesla app to “waken” the car.
There is an open issue about this on github. Seems like the problem lies with the teslajsonpy library. Someone has offered to fix it, but the guy who owns that library doesn’t seem to respond…
I don’t know…
But it seems to me like there are other python tesla libs on github that are more extensive and better maintained… Others also mention that this library doesn’t work at all after tesla software v 9
I have TMS with v9 and this script works for me.
- id: tesla_hvac_morning
alias: Tesla HVAC Morning Automation
trigger:
- at: 06:45:00
platform: time
condition:
- condition: state
entity_id: device_tracker.tesla_model_s_location_tracker
state: home
- condition: time
weekday:
- mon
- tue
- wed
- thu
- fri
action:
- service: climate.set_operation_mode
data:
entity_id: climate.tesla_model_s_hvac_climate_system
operation_mode: ‘on’
- data:
message: Tesla HVAC turned On
title: Tesla AC
service: notify.pushbullet
NB: I have replaced the identificator with … Not sure if that should be posted public or not.
I came here looking for answer to this question for my new Model 3. I think I have figured out why it would work from the web interface but fail when I tried to have a automation call it.
You can’t call the service “climate.turn_on”
You must call “climate.set_operation_mode” and set “operation_mode”: “ON”
Ok, I may have found a workaround for this. My car did wake up this morning when I sent it a command.
Tested it this morning with success… I’ll do some more tests during the day.
Ok, I have successfully managed to turn on the climate when the car is hibernating.
First command sent to the car, did nothing → wait 10-15 seconds → second command turns on the climate.
Looks like the car wakes up the first time but do not accept/recieve command to turn on the climate. Second time works as normal.