add climate action attribute to climate state

for backwards compatability
This commit is contained in:
Marcel van der Veldt 2019-09-06 21:06:04 +02:00 committed by marcelveldt
parent 7a6b84f418
commit 8cb72b7e69
4 changed files with 11 additions and 1 deletions

View File

@ -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;

View File

@ -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

View File

@ -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)

View File

@ -2,7 +2,7 @@
"""aioesphomeapi setup script."""
from setuptools import find_packages, setup
VERSION = '2.2.0'
VERSION = '2.2.4'
PROJECT_NAME = 'aioesphomeapi'
PROJECT_PACKAGE_NAME = 'aioesphomeapi'
PROJECT_LICENSE = 'MIT'