mirror of
https://github.com/home-assistant/core.git
synced 2026-08-31 10:34:00 +01:00
Bump tesla-fleet-api to 1.5.2 (#175430)
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
ad93da9da5
commit
cee65c1201
@@ -8,5 +8,5 @@
|
||||
"integration_type": "hub",
|
||||
"iot_class": "cloud_polling",
|
||||
"loggers": ["tesla-fleet-api"],
|
||||
"requirements": ["tesla-fleet-api==1.4.7"]
|
||||
"requirements": ["tesla-fleet-api==1.5.2"]
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ from dataclasses import dataclass
|
||||
from itertools import chain
|
||||
from typing import Any, override
|
||||
|
||||
from tesla_fleet_api.const import AutoSeat, Scope, Seat
|
||||
from tesla_fleet_api.const import AutoSeat, Scope
|
||||
|
||||
from homeassistant.components.switch import (
|
||||
SwitchDeviceClass,
|
||||
@@ -48,7 +48,7 @@ VEHICLE_DESCRIPTIONS: tuple[TeslaFleetSwitchEntityDescription, ...] = (
|
||||
AutoSeat.FRONT_LEFT, True
|
||||
),
|
||||
off_func=lambda api: api.remote_auto_seat_climate_request(
|
||||
Seat.FRONT_LEFT, False
|
||||
AutoSeat.FRONT_LEFT, False
|
||||
),
|
||||
scopes=[Scope.VEHICLE_CMDS],
|
||||
),
|
||||
|
||||
@@ -9,5 +9,5 @@
|
||||
"iot_class": "cloud_polling",
|
||||
"loggers": ["tesla-fleet-api"],
|
||||
"quality_scale": "platinum",
|
||||
"requirements": ["tesla-fleet-api==1.4.7", "teslemetry-stream==0.9.1"]
|
||||
"requirements": ["tesla-fleet-api==1.5.2", "teslemetry-stream==0.9.1"]
|
||||
}
|
||||
|
||||
@@ -8,5 +8,5 @@
|
||||
"iot_class": "cloud_polling",
|
||||
"loggers": ["tessie", "tesla-fleet-api"],
|
||||
"quality_scale": "silver",
|
||||
"requirements": ["tessie-api==0.1.3", "tesla-fleet-api==1.4.7"]
|
||||
"requirements": ["tessie-api==0.1.3", "tesla-fleet-api==1.5.2"]
|
||||
}
|
||||
|
||||
Generated
+1
-1
@@ -3143,7 +3143,7 @@ temperusb==1.6.1
|
||||
# homeassistant.components.tesla_fleet
|
||||
# homeassistant.components.teslemetry
|
||||
# homeassistant.components.tessie
|
||||
tesla-fleet-api==1.4.7
|
||||
tesla-fleet-api==1.5.2
|
||||
|
||||
# homeassistant.components.powerwall
|
||||
tesla-powerwall==0.5.3
|
||||
|
||||
@@ -4,6 +4,7 @@ from unittest.mock import AsyncMock, patch
|
||||
|
||||
import pytest
|
||||
from syrupy.assertion import SnapshotAssertion
|
||||
from tesla_fleet_api.const import AutoSeat
|
||||
from tesla_fleet_api.exceptions import VehicleOffline
|
||||
|
||||
from homeassistant.components.switch import (
|
||||
@@ -150,6 +151,27 @@ async def test_switch_services(
|
||||
call.assert_called_once()
|
||||
|
||||
|
||||
async def test_switch_auto_seat_climate_off_seat_position(
|
||||
hass: HomeAssistant,
|
||||
normal_config_entry: MockConfigEntry,
|
||||
) -> None:
|
||||
"""Tests that turning off auto seat climate sends the 1-indexed AutoSeat position."""
|
||||
|
||||
await setup_platform(hass, normal_config_entry, [Platform.SWITCH])
|
||||
|
||||
with patch(
|
||||
"tesla_fleet_api.tesla.VehicleFleet.remote_auto_seat_climate_request",
|
||||
return_value=COMMAND_OK,
|
||||
) as call:
|
||||
await hass.services.async_call(
|
||||
SWITCH_DOMAIN,
|
||||
SERVICE_TURN_OFF,
|
||||
{ATTR_ENTITY_ID: "switch.test_auto_seat_climate_left"},
|
||||
blocking=True,
|
||||
)
|
||||
call.assert_called_once_with(AutoSeat.FRONT_LEFT, False)
|
||||
|
||||
|
||||
async def test_switch_no_scope(
|
||||
hass: HomeAssistant,
|
||||
entity_registry: er.EntityRegistry,
|
||||
|
||||
Reference in New Issue
Block a user