mirror of
https://github.com/esphome/aioesphomeapi.git
synced 2024-11-26 12:45:26 +01:00
Add device class support to Switch (#157)
This commit is contained in:
parent
7d05c9b52a
commit
34180576ca
@ -513,6 +513,7 @@ message ListEntitiesSwitchResponse {
|
|||||||
bool assumed_state = 6;
|
bool assumed_state = 6;
|
||||||
bool disabled_by_default = 7;
|
bool disabled_by_default = 7;
|
||||||
EntityCategory entity_category = 8;
|
EntityCategory entity_category = 8;
|
||||||
|
string device_class = 9;
|
||||||
}
|
}
|
||||||
message SwitchStateResponse {
|
message SwitchStateResponse {
|
||||||
option (id) = 26;
|
option (id) = 26;
|
||||||
|
File diff suppressed because one or more lines are too long
@ -375,6 +375,7 @@ class SensorState(EntityState):
|
|||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
class SwitchInfo(EntityInfo):
|
class SwitchInfo(EntityInfo):
|
||||||
assumed_state: bool = False
|
assumed_state: bool = False
|
||||||
|
device_class: str = ""
|
||||||
|
|
||||||
|
|
||||||
@dataclass(frozen=True)
|
@dataclass(frozen=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user