mirror of
https://github.com/esphome/aioesphomeapi.git
synced 2024-11-28 13:05:12 +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;
|
||||
int32 accuracy_decimals = 7;
|
||||
bool force_update = 8;
|
||||
string device_class = 9;
|
||||
}
|
||||
message SensorStateResponse {
|
||||
option (id) = 25;
|
||||
|
File diff suppressed because one or more lines are too long
@ -149,6 +149,7 @@ class LightState(EntityState):
|
||||
@attr.s
|
||||
class SensorInfo(EntityInfo):
|
||||
icon = attr.ib(type=str, default='')
|
||||
device_class = attr.ib(type=str, default='')
|
||||
unit_of_measurement = attr.ib(type=str, default='')
|
||||
accuracy_decimals = attr.ib(type=int, default=0)
|
||||
force_update = attr.ib(type=bool, default=False)
|
||||
|
Loading…
Reference in New Issue
Block a user