Add sensor force_update option (#3)

This commit is contained in:
Otto Winter 2019-10-21 15:09:07 +02:00 committed by GitHub
parent e1e6384118
commit 9c514ebe54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 289 additions and 280 deletions

View File

@ -406,6 +406,7 @@ message ListEntitiesSensorResponse {
string icon = 5; string icon = 5;
string unit_of_measurement = 6; string unit_of_measurement = 6;
int32 accuracy_decimals = 7; int32 accuracy_decimals = 7;
bool force_update = 8;
} }
message SensorStateResponse { message SensorStateResponse {
option (id) = 25; option (id) = 25;

View File

@ -149,11 +149,11 @@ DESCRIPTOR.extensions_by_name['log'] = log
DESCRIPTOR.extensions_by_name['no_delay'] = no_delay DESCRIPTOR.extensions_by_name['no_delay'] = no_delay
_sym_db.RegisterFileDescriptor(DESCRIPTOR) _sym_db.RegisterFileDescriptor(DESCRIPTOR)
void = _reflection.GeneratedProtocolMessageType('void', (_message.Message,), dict( void = _reflection.GeneratedProtocolMessageType('void', (_message.Message,), {
DESCRIPTOR = _VOID, 'DESCRIPTOR' : _VOID,
__module__ = 'api_options_pb2' '__module__' : 'api_options_pb2'
# @@protoc_insertion_point(class_scope:void) # @@protoc_insertion_point(class_scope:void)
)) })
_sym_db.RegisterMessage(void) _sym_db.RegisterMessage(void)
google_dot_protobuf_dot_descriptor__pb2.MethodOptions.RegisterExtension(needs_setup_connection) google_dot_protobuf_dot_descriptor__pb2.MethodOptions.RegisterExtension(needs_setup_connection)

File diff suppressed because one or more lines are too long

View File

@ -135,6 +135,7 @@ class SensorInfo(EntityInfo):
icon = attr.ib(type=str) icon = attr.ib(type=str)
unit_of_measurement = attr.ib(type=str) unit_of_measurement = attr.ib(type=str)
accuracy_decimals = attr.ib(type=int) accuracy_decimals = attr.ib(type=int)
force_update = attr.ib(type=bool)
@attr.s @attr.s