Add device_class to text_sensor in ESPHome (#828)

This commit is contained in:
dougiteixeira 2024-02-25 19:19:31 -03:00 committed by GitHub
parent 27636f6381
commit 51be39f484
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 214 additions and 213 deletions

View File

@ -587,6 +587,7 @@ message ListEntitiesTextSensorResponse {
string icon = 5;
bool disabled_by_default = 6;
EntityCategory entity_category = 7;
string device_class = 8;
}
message TextSensorStateResponse {
option (id) = 27;

File diff suppressed because one or more lines are too long

View File

@ -441,7 +441,7 @@ class SwitchState(EntityState):
# ==================== TEXT SENSOR ====================
@_frozen_dataclass_decorator
class TextSensorInfo(EntityInfo):
pass
device_class: str = ""
@_frozen_dataclass_decorator