Add device class support to number (#309)

This commit is contained in:
Franck Nijhof 2022-11-17 20:00:02 +01:00 committed by GitHub
parent 356e4fbd8f
commit d9791d1874
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 133 additions and 124 deletions

View File

@ -902,6 +902,7 @@ message ListEntitiesNumberResponse {
EntityCategory entity_category = 10; EntityCategory entity_category = 10;
string unit_of_measurement = 11; string unit_of_measurement = 11;
NumberMode mode = 12; NumberMode mode = 12;
string device_class = 13;
} }
message NumberStateResponse { message NumberStateResponse {
option (id) = 50; option (id) = 50;

File diff suppressed because one or more lines are too long

View File

@ -565,6 +565,7 @@ class NumberInfo(EntityInfo):
mode: Optional[NumberMode] = converter_field( mode: Optional[NumberMode] = converter_field(
default=NumberMode.AUTO, converter=NumberMode.convert default=NumberMode.AUTO, converter=NumberMode.convert
) )
device_class: str = ""
@dataclass(frozen=True) @dataclass(frozen=True)