Compare commits
6 Commits
27247a5192
...
1c4d7a60bb
Author | SHA1 | Date |
---|---|---|
github-actions[bot] | 1c4d7a60bb | |
David Friedland | f1538a7ed0 | |
github-actions[bot] | e88f1468cb | |
Jesse Hills | 397c64f3e3 | |
github-actions[bot] | 0257210087 | |
Jesse Hills | b935707ceb |
|
@ -48,6 +48,7 @@ service APIConnection {
|
||||||
rpc media_player_command (MediaPlayerCommandRequest) returns (void) {}
|
rpc media_player_command (MediaPlayerCommandRequest) returns (void) {}
|
||||||
rpc date_command (DateCommandRequest) returns (void) {}
|
rpc date_command (DateCommandRequest) returns (void) {}
|
||||||
rpc time_command (TimeCommandRequest) returns (void) {}
|
rpc time_command (TimeCommandRequest) returns (void) {}
|
||||||
|
rpc datetime_command (DateTimeCommandRequest) returns (void) {}
|
||||||
|
|
||||||
rpc subscribe_bluetooth_le_advertisements (SubscribeBluetoothLEAdvertisementsRequest) returns (void) {}
|
rpc subscribe_bluetooth_le_advertisements (SubscribeBluetoothLEAdvertisementsRequest) returns (void) {}
|
||||||
rpc bluetooth_device_request(BluetoothDeviceRequest) returns (void) {}
|
rpc bluetooth_device_request(BluetoothDeviceRequest) returns (void) {}
|
||||||
|
@ -1720,6 +1721,33 @@ message TimeCommandRequest {
|
||||||
uint32 second = 4;
|
uint32 second = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ==================== EVENT ====================
|
||||||
|
message ListEntitiesEventResponse {
|
||||||
|
option (id) = 107;
|
||||||
|
option (source) = SOURCE_SERVER;
|
||||||
|
option (ifdef) = "USE_EVENT";
|
||||||
|
|
||||||
|
string object_id = 1;
|
||||||
|
fixed32 key = 2;
|
||||||
|
string name = 3;
|
||||||
|
string unique_id = 4;
|
||||||
|
|
||||||
|
string icon = 5;
|
||||||
|
bool disabled_by_default = 6;
|
||||||
|
EntityCategory entity_category = 7;
|
||||||
|
string device_class = 8;
|
||||||
|
|
||||||
|
repeated string event_types = 9;
|
||||||
|
}
|
||||||
|
message EventResponse {
|
||||||
|
option (id) = 108;
|
||||||
|
option (source) = SOURCE_SERVER;
|
||||||
|
option (ifdef) = "USE_EVENT";
|
||||||
|
|
||||||
|
fixed32 key = 1;
|
||||||
|
string event_type = 2;
|
||||||
|
}
|
||||||
|
|
||||||
// ==================== VALVE ====================
|
// ==================== VALVE ====================
|
||||||
message ListEntitiesValveResponse {
|
message ListEntitiesValveResponse {
|
||||||
option (id) = 109;
|
option (id) = 109;
|
||||||
|
@ -1768,3 +1796,40 @@ message ValveCommandRequest {
|
||||||
float position = 3;
|
float position = 3;
|
||||||
bool stop = 4;
|
bool stop = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ==================== DATETIME DATETIME ====================
|
||||||
|
message ListEntitiesDateTimeResponse {
|
||||||
|
option (id) = 112;
|
||||||
|
option (source) = SOURCE_SERVER;
|
||||||
|
option (ifdef) = "USE_DATETIME_DATETIME";
|
||||||
|
|
||||||
|
string object_id = 1;
|
||||||
|
fixed32 key = 2;
|
||||||
|
string name = 3;
|
||||||
|
string unique_id = 4;
|
||||||
|
|
||||||
|
string icon = 5;
|
||||||
|
bool disabled_by_default = 6;
|
||||||
|
EntityCategory entity_category = 7;
|
||||||
|
}
|
||||||
|
message DateTimeStateResponse {
|
||||||
|
option (id) = 113;
|
||||||
|
option (source) = SOURCE_SERVER;
|
||||||
|
option (ifdef) = "USE_DATETIME_DATETIME";
|
||||||
|
option (no_delay) = true;
|
||||||
|
|
||||||
|
fixed32 key = 1;
|
||||||
|
// If the datetime does not have a valid state yet.
|
||||||
|
// Equivalent to `!obj->has_state()` - inverse logic to make state packets smaller
|
||||||
|
bool missing_state = 2;
|
||||||
|
fixed32 epoch_seconds = 3;
|
||||||
|
}
|
||||||
|
message DateTimeCommandRequest {
|
||||||
|
option (id) = 114;
|
||||||
|
option (source) = SOURCE_CLIENT;
|
||||||
|
option (ifdef) = "USE_DATETIME_DATETIME";
|
||||||
|
option (no_delay) = true;
|
||||||
|
|
||||||
|
fixed32 key = 1;
|
||||||
|
fixed32 epoch_seconds = 2;
|
||||||
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -38,6 +38,7 @@ from .api_pb2 import ( # type: ignore
|
||||||
ClimateCommandRequest,
|
ClimateCommandRequest,
|
||||||
CoverCommandRequest,
|
CoverCommandRequest,
|
||||||
DateCommandRequest,
|
DateCommandRequest,
|
||||||
|
DateTimeCommandRequest,
|
||||||
DeviceInfoRequest,
|
DeviceInfoRequest,
|
||||||
DeviceInfoResponse,
|
DeviceInfoResponse,
|
||||||
ExecuteServiceArgument,
|
ExecuteServiceArgument,
|
||||||
|
@ -1118,6 +1119,18 @@ class APIClient:
|
||||||
TimeCommandRequest(key=key, hour=hour, minute=minute, second=second)
|
TimeCommandRequest(key=key, hour=hour, minute=minute, second=second)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def datetime_command(
|
||||||
|
self,
|
||||||
|
key: int,
|
||||||
|
epoch_seconds: int,
|
||||||
|
) -> None:
|
||||||
|
self._get_connection().send_message(
|
||||||
|
DateTimeCommandRequest(
|
||||||
|
key=key,
|
||||||
|
epoch_seconds=epoch_seconds,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
def select_command(self, key: int, state: str) -> None:
|
def select_command(self, key: int, state: str) -> None:
|
||||||
self._get_connection().send_message(SelectCommandRequest(key=key, state=state))
|
self._get_connection().send_message(SelectCommandRequest(key=key, state=state))
|
||||||
|
|
||||||
|
|
|
@ -40,10 +40,13 @@ from .api_pb2 import ( # type: ignore
|
||||||
CoverStateResponse,
|
CoverStateResponse,
|
||||||
DateCommandRequest,
|
DateCommandRequest,
|
||||||
DateStateResponse,
|
DateStateResponse,
|
||||||
|
DateTimeCommandRequest,
|
||||||
|
DateTimeStateResponse,
|
||||||
DeviceInfoRequest,
|
DeviceInfoRequest,
|
||||||
DeviceInfoResponse,
|
DeviceInfoResponse,
|
||||||
DisconnectRequest,
|
DisconnectRequest,
|
||||||
DisconnectResponse,
|
DisconnectResponse,
|
||||||
|
EventResponse,
|
||||||
ExecuteServiceRequest,
|
ExecuteServiceRequest,
|
||||||
FanCommandRequest,
|
FanCommandRequest,
|
||||||
FanStateResponse,
|
FanStateResponse,
|
||||||
|
@ -62,7 +65,9 @@ from .api_pb2 import ( # type: ignore
|
||||||
ListEntitiesClimateResponse,
|
ListEntitiesClimateResponse,
|
||||||
ListEntitiesCoverResponse,
|
ListEntitiesCoverResponse,
|
||||||
ListEntitiesDateResponse,
|
ListEntitiesDateResponse,
|
||||||
|
ListEntitiesDateTimeResponse,
|
||||||
ListEntitiesDoneResponse,
|
ListEntitiesDoneResponse,
|
||||||
|
ListEntitiesEventResponse,
|
||||||
ListEntitiesFanResponse,
|
ListEntitiesFanResponse,
|
||||||
ListEntitiesLightResponse,
|
ListEntitiesLightResponse,
|
||||||
ListEntitiesLockResponse,
|
ListEntitiesLockResponse,
|
||||||
|
@ -371,7 +376,12 @@ MESSAGE_TYPE_TO_PROTO = {
|
||||||
104: TimeStateResponse,
|
104: TimeStateResponse,
|
||||||
105: TimeCommandRequest,
|
105: TimeCommandRequest,
|
||||||
106: VoiceAssistantAudio,
|
106: VoiceAssistantAudio,
|
||||||
|
107: ListEntitiesEventResponse,
|
||||||
|
108: EventResponse,
|
||||||
109: ListEntitiesValveResponse,
|
109: ListEntitiesValveResponse,
|
||||||
110: ValveStateResponse,
|
110: ValveStateResponse,
|
||||||
111: ValveCommandRequest,
|
111: ValveCommandRequest,
|
||||||
|
112: ListEntitiesDateTimeResponse,
|
||||||
|
113: DateTimeStateResponse,
|
||||||
|
114: DateTimeCommandRequest,
|
||||||
}
|
}
|
||||||
|
|
|
@ -262,6 +262,18 @@ class CoverState(EntityState):
|
||||||
return self.position == 0.0
|
return self.position == 0.0
|
||||||
|
|
||||||
|
|
||||||
|
# ==================== EVENT ==================
|
||||||
|
@_frozen_dataclass_decorator
|
||||||
|
class EventInfo(EntityInfo):
|
||||||
|
device_class: str = ""
|
||||||
|
event_types: list[str] = converter_field(default_factory=list, converter=list)
|
||||||
|
|
||||||
|
|
||||||
|
@_frozen_dataclass_decorator
|
||||||
|
class Event(EntityState):
|
||||||
|
event_type: str = ""
|
||||||
|
|
||||||
|
|
||||||
# ==================== FAN ====================
|
# ==================== FAN ====================
|
||||||
@_frozen_dataclass_decorator
|
@_frozen_dataclass_decorator
|
||||||
class FanInfo(EntityInfo):
|
class FanInfo(EntityInfo):
|
||||||
|
@ -690,6 +702,18 @@ class TimeState(EntityState):
|
||||||
second: int = 0
|
second: int = 0
|
||||||
|
|
||||||
|
|
||||||
|
# ==================== DATETIME DATETIME ====================
|
||||||
|
@_frozen_dataclass_decorator
|
||||||
|
class DateTimeInfo(EntityInfo):
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@_frozen_dataclass_decorator
|
||||||
|
class DateTimeState(EntityState):
|
||||||
|
missing_state: bool = False
|
||||||
|
epoch_seconds: int = 0
|
||||||
|
|
||||||
|
|
||||||
# ==================== SELECT ====================
|
# ==================== SELECT ====================
|
||||||
@_frozen_dataclass_decorator
|
@_frozen_dataclass_decorator
|
||||||
class SelectInfo(EntityInfo):
|
class SelectInfo(EntityInfo):
|
||||||
|
@ -885,6 +909,7 @@ COMPONENT_TYPE_TO_INFO: dict[str, type[EntityInfo]] = {
|
||||||
"climate": ClimateInfo,
|
"climate": ClimateInfo,
|
||||||
"number": NumberInfo,
|
"number": NumberInfo,
|
||||||
"date": DateInfo,
|
"date": DateInfo,
|
||||||
|
"datetime": DateTimeInfo,
|
||||||
"select": SelectInfo,
|
"select": SelectInfo,
|
||||||
"siren": SirenInfo,
|
"siren": SirenInfo,
|
||||||
"button": ButtonInfo,
|
"button": ButtonInfo,
|
||||||
|
@ -894,6 +919,7 @@ COMPONENT_TYPE_TO_INFO: dict[str, type[EntityInfo]] = {
|
||||||
"text": TextInfo,
|
"text": TextInfo,
|
||||||
"time": TimeInfo,
|
"time": TimeInfo,
|
||||||
"valve": ValveInfo,
|
"valve": ValveInfo,
|
||||||
|
"event": EventInfo,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1242,6 +1268,7 @@ _TYPE_TO_NAME = {
|
||||||
LightInfo: "light",
|
LightInfo: "light",
|
||||||
NumberInfo: "number",
|
NumberInfo: "number",
|
||||||
DateInfo: "date",
|
DateInfo: "date",
|
||||||
|
DateTimeInfo: "datetime",
|
||||||
SelectInfo: "select",
|
SelectInfo: "select",
|
||||||
SensorInfo: "sensor",
|
SensorInfo: "sensor",
|
||||||
SirenInfo: "siren",
|
SirenInfo: "siren",
|
||||||
|
@ -1255,6 +1282,7 @@ _TYPE_TO_NAME = {
|
||||||
TextInfo: "text_info",
|
TextInfo: "text_info",
|
||||||
TimeInfo: "time",
|
TimeInfo: "time",
|
||||||
ValveInfo: "valve",
|
ValveInfo: "valve",
|
||||||
|
EventInfo: "event",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,8 @@ from .api_pb2 import ( # type: ignore
|
||||||
ClimateStateResponse,
|
ClimateStateResponse,
|
||||||
CoverStateResponse,
|
CoverStateResponse,
|
||||||
DateStateResponse,
|
DateStateResponse,
|
||||||
|
DateTimeStateResponse,
|
||||||
|
EventResponse,
|
||||||
FanStateResponse,
|
FanStateResponse,
|
||||||
LightStateResponse,
|
LightStateResponse,
|
||||||
ListEntitiesAlarmControlPanelResponse,
|
ListEntitiesAlarmControlPanelResponse,
|
||||||
|
@ -17,6 +19,8 @@ from .api_pb2 import ( # type: ignore
|
||||||
ListEntitiesClimateResponse,
|
ListEntitiesClimateResponse,
|
||||||
ListEntitiesCoverResponse,
|
ListEntitiesCoverResponse,
|
||||||
ListEntitiesDateResponse,
|
ListEntitiesDateResponse,
|
||||||
|
ListEntitiesDateTimeResponse,
|
||||||
|
ListEntitiesEventResponse,
|
||||||
ListEntitiesFanResponse,
|
ListEntitiesFanResponse,
|
||||||
ListEntitiesLightResponse,
|
ListEntitiesLightResponse,
|
||||||
ListEntitiesLockResponse,
|
ListEntitiesLockResponse,
|
||||||
|
@ -56,8 +60,12 @@ from .model import (
|
||||||
CoverState,
|
CoverState,
|
||||||
DateInfo,
|
DateInfo,
|
||||||
DateState,
|
DateState,
|
||||||
|
DateTimeInfo,
|
||||||
|
DateTimeState,
|
||||||
EntityInfo,
|
EntityInfo,
|
||||||
EntityState,
|
EntityState,
|
||||||
|
Event,
|
||||||
|
EventInfo,
|
||||||
FanInfo,
|
FanInfo,
|
||||||
FanState,
|
FanState,
|
||||||
LightInfo,
|
LightInfo,
|
||||||
|
@ -87,46 +95,50 @@ from .model import (
|
||||||
)
|
)
|
||||||
|
|
||||||
SUBSCRIBE_STATES_RESPONSE_TYPES: dict[Any, type[EntityState]] = {
|
SUBSCRIBE_STATES_RESPONSE_TYPES: dict[Any, type[EntityState]] = {
|
||||||
|
AlarmControlPanelStateResponse: AlarmControlPanelEntityState,
|
||||||
BinarySensorStateResponse: BinarySensorState,
|
BinarySensorStateResponse: BinarySensorState,
|
||||||
|
ClimateStateResponse: ClimateState,
|
||||||
CoverStateResponse: CoverState,
|
CoverStateResponse: CoverState,
|
||||||
|
DateStateResponse: DateState,
|
||||||
|
DateTimeStateResponse: DateTimeState,
|
||||||
|
EventResponse: Event,
|
||||||
FanStateResponse: FanState,
|
FanStateResponse: FanState,
|
||||||
LightStateResponse: LightState,
|
LightStateResponse: LightState,
|
||||||
|
LockStateResponse: LockEntityState,
|
||||||
|
MediaPlayerStateResponse: MediaPlayerEntityState,
|
||||||
NumberStateResponse: NumberState,
|
NumberStateResponse: NumberState,
|
||||||
DateStateResponse: DateState,
|
|
||||||
SelectStateResponse: SelectState,
|
SelectStateResponse: SelectState,
|
||||||
SensorStateResponse: SensorState,
|
SensorStateResponse: SensorState,
|
||||||
SirenStateResponse: SirenState,
|
SirenStateResponse: SirenState,
|
||||||
SwitchStateResponse: SwitchState,
|
SwitchStateResponse: SwitchState,
|
||||||
TextStateResponse: TextState,
|
|
||||||
TextSensorStateResponse: TextSensorState,
|
TextSensorStateResponse: TextSensorState,
|
||||||
ClimateStateResponse: ClimateState,
|
TextStateResponse: TextState,
|
||||||
LockStateResponse: LockEntityState,
|
|
||||||
MediaPlayerStateResponse: MediaPlayerEntityState,
|
|
||||||
AlarmControlPanelStateResponse: AlarmControlPanelEntityState,
|
|
||||||
TimeStateResponse: TimeState,
|
TimeStateResponse: TimeState,
|
||||||
ValveStateResponse: ValveState,
|
ValveStateResponse: ValveState,
|
||||||
}
|
}
|
||||||
|
|
||||||
LIST_ENTITIES_SERVICES_RESPONSE_TYPES: dict[Any, type[EntityInfo] | None] = {
|
LIST_ENTITIES_SERVICES_RESPONSE_TYPES: dict[Any, type[EntityInfo] | None] = {
|
||||||
|
ListEntitiesAlarmControlPanelResponse: AlarmControlPanelInfo,
|
||||||
ListEntitiesBinarySensorResponse: BinarySensorInfo,
|
ListEntitiesBinarySensorResponse: BinarySensorInfo,
|
||||||
ListEntitiesButtonResponse: ButtonInfo,
|
ListEntitiesButtonResponse: ButtonInfo,
|
||||||
|
ListEntitiesCameraResponse: CameraInfo,
|
||||||
|
ListEntitiesClimateResponse: ClimateInfo,
|
||||||
ListEntitiesCoverResponse: CoverInfo,
|
ListEntitiesCoverResponse: CoverInfo,
|
||||||
|
ListEntitiesDateResponse: DateInfo,
|
||||||
|
ListEntitiesDateTimeResponse: DateTimeInfo,
|
||||||
|
ListEntitiesEventResponse: EventInfo,
|
||||||
ListEntitiesFanResponse: FanInfo,
|
ListEntitiesFanResponse: FanInfo,
|
||||||
ListEntitiesLightResponse: LightInfo,
|
ListEntitiesLightResponse: LightInfo,
|
||||||
|
ListEntitiesLockResponse: LockInfo,
|
||||||
|
ListEntitiesMediaPlayerResponse: MediaPlayerInfo,
|
||||||
ListEntitiesNumberResponse: NumberInfo,
|
ListEntitiesNumberResponse: NumberInfo,
|
||||||
ListEntitiesDateResponse: DateInfo,
|
|
||||||
ListEntitiesSelectResponse: SelectInfo,
|
ListEntitiesSelectResponse: SelectInfo,
|
||||||
ListEntitiesSensorResponse: SensorInfo,
|
ListEntitiesSensorResponse: SensorInfo,
|
||||||
|
ListEntitiesServicesResponse: None,
|
||||||
ListEntitiesSirenResponse: SirenInfo,
|
ListEntitiesSirenResponse: SirenInfo,
|
||||||
ListEntitiesSwitchResponse: SwitchInfo,
|
ListEntitiesSwitchResponse: SwitchInfo,
|
||||||
ListEntitiesTextResponse: TextInfo,
|
ListEntitiesTextResponse: TextInfo,
|
||||||
ListEntitiesTextSensorResponse: TextSensorInfo,
|
ListEntitiesTextSensorResponse: TextSensorInfo,
|
||||||
ListEntitiesServicesResponse: None,
|
|
||||||
ListEntitiesCameraResponse: CameraInfo,
|
|
||||||
ListEntitiesClimateResponse: ClimateInfo,
|
|
||||||
ListEntitiesLockResponse: LockInfo,
|
|
||||||
ListEntitiesMediaPlayerResponse: MediaPlayerInfo,
|
|
||||||
ListEntitiesAlarmControlPanelResponse: AlarmControlPanelInfo,
|
|
||||||
ListEntitiesTimeResponse: TimeInfo,
|
ListEntitiesTimeResponse: TimeInfo,
|
||||||
ListEntitiesValveResponse: ValveInfo,
|
ListEntitiesValveResponse: ValveInfo,
|
||||||
}
|
}
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -11,7 +11,7 @@ with open(os.path.join(here, "README.rst"), encoding="utf-8") as readme_file:
|
||||||
long_description = readme_file.read()
|
long_description = readme_file.read()
|
||||||
|
|
||||||
|
|
||||||
VERSION = "24.1.1"
|
VERSION = "24.3.0"
|
||||||
PROJECT_NAME = "aioesphomeapi"
|
PROJECT_NAME = "aioesphomeapi"
|
||||||
PROJECT_PACKAGE_NAME = "aioesphomeapi"
|
PROJECT_PACKAGE_NAME = "aioesphomeapi"
|
||||||
PROJECT_LICENSE = "MIT"
|
PROJECT_LICENSE = "MIT"
|
||||||
|
|
|
@ -42,6 +42,7 @@ from aioesphomeapi.api_pb2 import (
|
||||||
ClimateCommandRequest,
|
ClimateCommandRequest,
|
||||||
CoverCommandRequest,
|
CoverCommandRequest,
|
||||||
DateCommandRequest,
|
DateCommandRequest,
|
||||||
|
DateTimeCommandRequest,
|
||||||
DeviceInfoResponse,
|
DeviceInfoResponse,
|
||||||
DisconnectResponse,
|
DisconnectResponse,
|
||||||
ExecuteServiceArgument,
|
ExecuteServiceArgument,
|
||||||
|
@ -668,6 +669,30 @@ async def test_time_command(
|
||||||
send.assert_called_once_with(TimeCommandRequest(**req))
|
send.assert_called_once_with(TimeCommandRequest(**req))
|
||||||
|
|
||||||
|
|
||||||
|
# Test date_time command
|
||||||
|
@pytest.mark.asyncio
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
"cmd, req",
|
||||||
|
[
|
||||||
|
(
|
||||||
|
dict(key=1, epoch_seconds=1735648230),
|
||||||
|
dict(key=1, epoch_seconds=1735648230),
|
||||||
|
),
|
||||||
|
(
|
||||||
|
dict(key=1, epoch_seconds=1735689600),
|
||||||
|
dict(key=1, epoch_seconds=1735689600),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
async def test_datetime_command(
|
||||||
|
auth_client: APIClient, cmd: dict[str, Any], req: dict[str, Any]
|
||||||
|
) -> None:
|
||||||
|
send = patch_send(auth_client)
|
||||||
|
|
||||||
|
auth_client.datetime_command(**cmd)
|
||||||
|
send.assert_called_once_with(DateTimeCommandRequest(**req))
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"cmd, req",
|
"cmd, req",
|
||||||
|
|
|
@ -14,7 +14,9 @@ from aioesphomeapi.api_pb2 import (
|
||||||
ClimateStateResponse,
|
ClimateStateResponse,
|
||||||
CoverStateResponse,
|
CoverStateResponse,
|
||||||
DateStateResponse,
|
DateStateResponse,
|
||||||
|
DateTimeStateResponse,
|
||||||
DeviceInfoResponse,
|
DeviceInfoResponse,
|
||||||
|
EventResponse,
|
||||||
FanStateResponse,
|
FanStateResponse,
|
||||||
HomeassistantServiceMap,
|
HomeassistantServiceMap,
|
||||||
HomeassistantServiceResponse,
|
HomeassistantServiceResponse,
|
||||||
|
@ -25,6 +27,8 @@ from aioesphomeapi.api_pb2 import (
|
||||||
ListEntitiesClimateResponse,
|
ListEntitiesClimateResponse,
|
||||||
ListEntitiesCoverResponse,
|
ListEntitiesCoverResponse,
|
||||||
ListEntitiesDateResponse,
|
ListEntitiesDateResponse,
|
||||||
|
ListEntitiesDateTimeResponse,
|
||||||
|
ListEntitiesEventResponse,
|
||||||
ListEntitiesFanResponse,
|
ListEntitiesFanResponse,
|
||||||
ListEntitiesLightResponse,
|
ListEntitiesLightResponse,
|
||||||
ListEntitiesLockResponse,
|
ListEntitiesLockResponse,
|
||||||
|
@ -77,7 +81,11 @@ from aioesphomeapi.model import (
|
||||||
CoverState,
|
CoverState,
|
||||||
DateInfo,
|
DateInfo,
|
||||||
DateState,
|
DateState,
|
||||||
|
DateTimeInfo,
|
||||||
|
DateTimeState,
|
||||||
DeviceInfo,
|
DeviceInfo,
|
||||||
|
Event,
|
||||||
|
EventInfo,
|
||||||
FanInfo,
|
FanInfo,
|
||||||
FanState,
|
FanState,
|
||||||
HomeassistantServiceCall,
|
HomeassistantServiceCall,
|
||||||
|
@ -274,6 +282,10 @@ def test_api_version_ord():
|
||||||
(TextState, TextStateResponse),
|
(TextState, TextStateResponse),
|
||||||
(TimeInfo, ListEntitiesTimeResponse),
|
(TimeInfo, ListEntitiesTimeResponse),
|
||||||
(TimeState, TimeStateResponse),
|
(TimeState, TimeStateResponse),
|
||||||
|
(DateTimeInfo, ListEntitiesDateTimeResponse),
|
||||||
|
(DateTimeState, DateTimeStateResponse),
|
||||||
|
(EventInfo, ListEntitiesEventResponse),
|
||||||
|
(Event, EventResponse),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_basic_pb_conversions(model, pb):
|
def test_basic_pb_conversions(model, pb):
|
||||||
|
|
Loading…
Reference in New Issue