mirror of
https://github.com/esphome/aioesphomeapi.git
synced 2025-02-18 02:02:13 +01:00
Add device_class attribute to sensor (#25)
This commit is contained in:
parent
33ad17f99c
commit
10b0d82a23
@ -418,6 +418,7 @@ message ListEntitiesSensorResponse {
|
|||||||
string unit_of_measurement = 6;
|
string unit_of_measurement = 6;
|
||||||
int32 accuracy_decimals = 7;
|
int32 accuracy_decimals = 7;
|
||||||
bool force_update = 8;
|
bool force_update = 8;
|
||||||
|
string device_class = 9;
|
||||||
}
|
}
|
||||||
message SensorStateResponse {
|
message SensorStateResponse {
|
||||||
option (id) = 25;
|
option (id) = 25;
|
||||||
|
File diff suppressed because one or more lines are too long
@ -149,6 +149,7 @@ class LightState(EntityState):
|
|||||||
@attr.s
|
@attr.s
|
||||||
class SensorInfo(EntityInfo):
|
class SensorInfo(EntityInfo):
|
||||||
icon = attr.ib(type=str, default='')
|
icon = attr.ib(type=str, default='')
|
||||||
|
device_class = attr.ib(type=str, default='')
|
||||||
unit_of_measurement = attr.ib(type=str, default='')
|
unit_of_measurement = attr.ib(type=str, default='')
|
||||||
accuracy_decimals = attr.ib(type=int, default=0)
|
accuracy_decimals = attr.ib(type=int, default=0)
|
||||||
force_update = attr.ib(type=bool, default=False)
|
force_update = attr.ib(type=bool, default=False)
|
||||||
|
Loading…
Reference in New Issue
Block a user