Skip to content

Commit

Permalink
Auto heaters
Browse files Browse the repository at this point in the history
  • Loading branch information
Bre77 committed Feb 3, 2024
1 parent c1be353 commit 1744244
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
7 changes: 2 additions & 5 deletions custom_components/teslemetry/strings.json
Original file line number Diff line number Diff line change
Expand Up @@ -355,20 +355,17 @@
"charge_state_charge_enable_request": {
"name": "Charge"
},
"climate_state_defrost_mode": {
"name": "Defrost mode"
},
"vehicle_state_sentry_mode": {
"name": "Sentry mode"
},
"vehicle_state_valet_mode": {
"name": "Valet mode"
},
"climate_state_auto_seat_climate_left": {
"name": "Steering wheel auto heater"
"name": "Left seat auto heater"
},
"climate_state_auto_seat_climate_right": {
"name": "Steering wheel auto heater"
"name": "Right seat auto heater"
},
"climate_state_auto_steering_wheel_heat": {
"name": "Steering wheel auto heater"
Expand Down
12 changes: 12 additions & 0 deletions custom_components/teslemetry/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ class TeslemetrySwitchEntityDescription(SwitchEntityDescription):
off_func=lambda api: api.set_valet_mode(on=False),
scopes=[Scopes.VEHICLE_CMDS]
),
TeslemetrySwitchEntityDescription(
key="climate_state_auto_seat_climate_left",
on_func=lambda api: api.remote_auto_seat_climate_request(0,True),
off_func=lambda api: api.remote_auto_seat_climate_request(0,False),
scopes=[Scopes.VEHICLE_CMDS]
),
TeslemetrySwitchEntityDescription(
key="climate_state_auto_seat_climate_right",
on_func=lambda api: api.remote_auto_seat_climate_request(1,True),
off_func=lambda api: api.remote_auto_seat_climate_request(1,False),
scopes=[Scopes.VEHICLE_CMDS]
),
TeslemetrySwitchEntityDescription(
key="climate_state_auto_steering_wheel_heat",
on_func=lambda api: api.remote_auto_steering_wheel_heat_climate_request(on=True),
Expand Down

0 comments on commit 1744244

Please sign in to comment.