Add device_class to text_sensor in ESPHome

This commit is contained in:
dougiteixeira 2024-02-09 04:15:12 +00:00
parent 41eeabcc08
commit 23ce36c6d8
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