mirror of
https://github.com/esphome/aioesphomeapi.git
synced 2024-12-22 16:48:04 +01:00
add climate action attribute to climate state
for backwards compatability
This commit is contained in:
parent
7a6b84f418
commit
8cb72b7e69
@ -675,6 +675,7 @@ message ClimateStateResponse {
|
||||
float target_temperature_low = 5;
|
||||
float target_temperature_high = 6;
|
||||
bool away = 7;
|
||||
ClimateMode action = 8;
|
||||
}
|
||||
message ClimateCommandRequest {
|
||||
option (id) = 48;
|
||||
|
@ -2755,6 +2755,13 @@ _CLIMATESTATERESPONSE = _descriptor.Descriptor(
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
_descriptor.FieldDescriptor(
|
||||
name='action', full_name='ClimateStateResponse.action', index=7,
|
||||
number=8, type=14, cpp_type=8, label=1,
|
||||
has_default_value=False, default_value=0,
|
||||
message_type=None, enum_type=None, containing_type=None,
|
||||
is_extension=False, extension_scope=None,
|
||||
serialized_options=None, file=DESCRIPTOR),
|
||||
],
|
||||
extensions=[
|
||||
],
|
||||
@ -2887,6 +2894,7 @@ _LISTENTITIESSERVICESRESPONSE.fields_by_name['args'].message_type = _LISTENTITIE
|
||||
_EXECUTESERVICEREQUEST.fields_by_name['args'].message_type = _EXECUTESERVICEARGUMENT
|
||||
_LISTENTITIESCLIMATERESPONSE.fields_by_name['supported_modes'].enum_type = _CLIMATEMODE
|
||||
_CLIMATESTATERESPONSE.fields_by_name['mode'].enum_type = _CLIMATEMODE
|
||||
_CLIMATESTATERESPONSE.fields_by_name['action'].enum_type = _CLIMATEMODE
|
||||
_CLIMATECOMMANDREQUEST.fields_by_name['mode'].enum_type = _CLIMATEMODE
|
||||
DESCRIPTOR.message_types_by_name['HelloRequest'] = _HELLOREQUEST
|
||||
DESCRIPTOR.message_types_by_name['HelloResponse'] = _HELLORESPONSE
|
||||
|
@ -202,6 +202,7 @@ class ClimateInfo(EntityInfo):
|
||||
@attr.s
|
||||
class ClimateState(EntityState):
|
||||
mode = attr.ib(type=ClimateMode, converter=ClimateMode)
|
||||
action = attr.ib(type=ClimateMode, converter=ClimateMode)
|
||||
current_temperature = attr.ib(type=float)
|
||||
target_temperature = attr.ib(type=float)
|
||||
target_temperature_low = attr.ib(type=float)
|
||||
|
Loading…
Reference in New Issue
Block a user