Sub label sensors (#16218)

* Support mqtt sensors for logo attributes

* Expose in api
This commit is contained in:
Nicolas Mowen
2025-02-08 12:47:01 -06:00
committed by Blake Blackshear
parent 1c3527f5c4
commit 9236898a9d
3 changed files with 7 additions and 2 deletions
+5 -1
View File
@@ -78,6 +78,10 @@ class ModelConfig(BaseModel):
def colormap(self) -> Dict[int, Tuple[int, int, int]]:
return self._colormap
@property
def non_logo_attributes(self) -> list[str]:
return ["face", "license_plate"]
@property
def all_attributes(self) -> list[str]:
return self._all_attributes
@@ -107,7 +111,7 @@ class ModelConfig(BaseModel):
self._all_attributes = list(unique_attributes)
self._all_attribute_logos = list(
unique_attributes - set(["face", "license_plate"])
unique_attributes - set(self.non_logo_attributes)
)
def check_and_load_plus_model(