Electricity Price Integration
Charge the car when electricity is cheapest.
Never step into a freezing car again! This guide shows how to automatically preheat your electric vehicle when temperatures drop - while saving battery by only heating when necessary.
| Benefit | Description |
|---|---|
| Comfort | Warm cabin and defrosted windows every morning |
| Battery | Preheating while plugged in uses grid power, not battery |
| Range | Preheated battery = better range in cold weather |
| Safety | Clear windows without scraping |
| Component | Description |
|---|---|
| Home Assistant | With Tesla, Polestar, VW or other EV integration |
| EV Integration | Tesla Custom Integration, Volkswagen We Connect, Polestar API, etc. |
| Mobile phone | For notifications |
| Brand | Integration | HACS |
|---|---|---|
| Tesla | Tesla Custom Integration | Yes |
| Volkswagen/Audi/Skoda | Volkswagen We Connect ID | Yes |
| Polestar | Polestar API | Yes |
| BMW | BMW Connected Drive | Yes |
| Mercedes | Mercedes ME | Yes |
| Hyundai/Kia | Hyundai/Kia Connect | Yes |
| Renault | Renault ZE Services | Yes |
With a typical EV integration you get these entities:
| Entity | Type | Description |
|---|---|---|
climate.car_climate | Climate | Turn climate on/off |
sensor.car_inside_temperature | Sensor | Interior temperature |
sensor.car_outside_temperature | Sensor | Exterior temperature |
sensor.car_battery_level | Sensor | Battery level in % |
sensor.car_charging | Sensor | Charging status |
select.car_seat_heater_* | Select | Seat heater (off/low/medium/high) |
The most important automation - turn on climate automatically when it’s freezing:
automation: - alias: "Car: Heating below 0 degrees" description: "Turns on car climate when temperature is below 0°C for 1 minute" mode: single trigger: - platform: numeric_state entity_id: sensor.car_inside_temperature below: 0 for: minutes: 1 condition: # Only if battery is above 40% - condition: numeric_state entity_id: sensor.car_battery_level above: 40 action: # Turn on climate - service: climate.set_preset_mode target: entity_id: climate.car_climate data: preset_mode: "on" # Wait 15 minutes - delay: minutes: 15 # Turn off again - service: climate.set_preset_mode target: entity_id: climate.car_climate data: preset_mode: "off"Get notified if the car gets too cold at night:
automation: - alias: "Car: Cold at night" description: "Sends notification when car is below 5°C at night" mode: single trigger: - platform: numeric_state entity_id: sensor.car_inside_temperature below: 5 condition: - condition: time after: "22:00:00" before: "07:00:00" action: - service: notify.mobile_app_your_phone data: title: "Car is cold" message: > Interior temp: {{ states("sensor.car_inside_temperature") }}°C data: tag: "car_cold"Bonus: Keep the car cool in summer:
automation: - alias: "Car: Cooling above 30 degrees" description: "Turns on AC when temperature is above 30°C" mode: single trigger: - platform: numeric_state entity_id: sensor.car_inside_temperature above: 30 for: seconds: 20 condition: - condition: numeric_state entity_id: sensor.car_battery_level above: 40 action: - service: climate.set_temperature target: entity_id: climate.car_climate data: temperature: 20 hvac_mode: "cool"
- alias: "Car: Turn off cooling below 20 degrees" description: "Turns off AC when temperature is below 20°C" mode: single trigger: - platform: numeric_state entity_id: sensor.car_inside_temperature below: 20 for: minutes: 2 action: - service: climate.turn_off target: entity_id: climate.car_climatePreheat the car automatically before work:
automation: - alias: "Car: Morning preheating" description: "Preheats the car at 07:00 on weekdays when cold" mode: single trigger: - platform: time at: "07:00:00" condition: - condition: time weekday: - mon - tue - wed - thu - fri # Only if it's cold - condition: numeric_state entity_id: sensor.car_inside_temperature below: 10 # Only if battery is OK - condition: numeric_state entity_id: sensor.car_battery_level above: 30 action: - service: climate.set_preset_mode target: entity_id: climate.car_climate data: preset_mode: "on" - service: notify.mobile_app_your_phone data: title: "Car is preheating" message: > Temp: {{ states("sensor.car_inside_temperature") }}°C → Ready in 15 min - delay: minutes: 15 - service: climate.set_preset_mode target: entity_id: climate.car_climate data: preset_mode: "off"Turn on seat heaters automatically with climate:
automation: - alias: "Car: Seat heaters when freezing" description: "Turns on seat heaters when climate activates in freezing conditions" mode: single trigger: - platform: state entity_id: climate.car_climate to: "heat_cool" condition: - condition: numeric_state entity_id: sensor.car_inside_temperature below: 5 action: # Turn on seat heaters on both front seats - service: select.select_option target: entity_id: select.car_seat_heater_left data: option: "high" - service: select.select_option target: entity_id: select.car_seat_heater_right data: option: "high" # Set to medium after 5 min - delay: minutes: 5 - service: select.select_option target: entity_id: - select.car_seat_heater_left - select.car_seat_heater_right data: option: "medium"type: entitiestitle: "EV Status"entities: - entity: sensor.car_inside_temperature name: Interior temp icon: mdi:thermometer - entity: sensor.car_outside_temperature name: Exterior temp icon: mdi:thermometer - entity: sensor.car_battery_level name: Battery icon: mdi:battery - entity: climate.car_climate name: Climate - entity: sensor.car_charging name: Chargingtype: thermostatentity: climate.car_climatename: Car Climatefeatures: - type: climate-preset-modes preset_modes: - "off" - "on" - "dog" - "camp"type: gaugeentity: sensor.car_inside_temperaturename: Cabin Temperatureunit: "°C"min: -20max: 50severity: green: 15 yellow: 25 red: 35needle: trueTesla has special preset modes:
| Mode | Description |
|---|---|
off | Climate off |
on | Normal heating/cooling |
dog | Dog mode - maintains comfortable temp and shows message on screen |
camp | Camp mode - maintains climate and power to devices |
# Activate dog modeservice: climate.set_preset_modetarget: entity_id: climate.car_climatedata: preset_mode: "dog"input_datetime: car_heating_time: name: "Car heating time" has_date: false has_time: true icon: mdi:car-clockinput_number: car_min_battery_heating: name: "Minimum battery for heating" min: 20 max: 80 step: 5 unit_of_measurement: "%" icon: mdi:battery-alert| Tip | Effect |
|---|---|
| Preheat while plugged in | +10-20% range |
| Use seat heaters instead of cabin heat | +5% range |
| Keep battery above 20% | Protects battery |
Electricity Price Integration
Charge the car when electricity is cheapest.
Low Battery Alert
Get notified before sensors run out.