mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
parent
5f8564bfc5
commit
011a076155
@ -7,7 +7,7 @@ from dataclasses import dataclass
|
|||||||
from itertools import chain
|
from itertools import chain
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from tesla_fleet_api.const import Scope, Seat
|
from tesla_fleet_api.const import Scope
|
||||||
from teslemetry_stream import TeslemetryStreamVehicle
|
from teslemetry_stream import TeslemetryStreamVehicle
|
||||||
|
|
||||||
from homeassistant.components.switch import (
|
from homeassistant.components.switch import (
|
||||||
@ -62,21 +62,15 @@ VEHICLE_DESCRIPTIONS: tuple[TeslemetrySwitchEntityDescription, ...] = (
|
|||||||
TeslemetrySwitchEntityDescription(
|
TeslemetrySwitchEntityDescription(
|
||||||
key="climate_state_auto_seat_climate_left",
|
key="climate_state_auto_seat_climate_left",
|
||||||
streaming_listener=lambda x, y: x.listen_AutoSeatClimateLeft(y),
|
streaming_listener=lambda x, y: x.listen_AutoSeatClimateLeft(y),
|
||||||
on_func=lambda api: api.remote_auto_seat_climate_request(Seat.FRONT_LEFT, True),
|
on_func=lambda api: api.remote_auto_seat_climate_request(1, True),
|
||||||
off_func=lambda api: api.remote_auto_seat_climate_request(
|
off_func=lambda api: api.remote_auto_seat_climate_request(1, False),
|
||||||
Seat.FRONT_LEFT, False
|
|
||||||
),
|
|
||||||
scopes=[Scope.VEHICLE_CMDS],
|
scopes=[Scope.VEHICLE_CMDS],
|
||||||
),
|
),
|
||||||
TeslemetrySwitchEntityDescription(
|
TeslemetrySwitchEntityDescription(
|
||||||
key="climate_state_auto_seat_climate_right",
|
key="climate_state_auto_seat_climate_right",
|
||||||
streaming_listener=lambda x, y: x.listen_AutoSeatClimateRight(y),
|
streaming_listener=lambda x, y: x.listen_AutoSeatClimateRight(y),
|
||||||
on_func=lambda api: api.remote_auto_seat_climate_request(
|
on_func=lambda api: api.remote_auto_seat_climate_request(2, True),
|
||||||
Seat.FRONT_RIGHT, True
|
off_func=lambda api: api.remote_auto_seat_climate_request(2, False),
|
||||||
),
|
|
||||||
off_func=lambda api: api.remote_auto_seat_climate_request(
|
|
||||||
Seat.FRONT_RIGHT, False
|
|
||||||
),
|
|
||||||
scopes=[Scope.VEHICLE_CMDS],
|
scopes=[Scope.VEHICLE_CMDS],
|
||||||
),
|
),
|
||||||
TeslemetrySwitchEntityDescription(
|
TeslemetrySwitchEntityDescription(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user