fridge: give DEODOR_FILTER its own entity keys, not AIR_FILTER's (code review)
DEODOR_FILTER reused AIR_FILTER.entities verbatim, so both capabilities produced identically-keyed entities (air_filter_usage/air_filter_status) despite living at different hrefs. adapter.flatten()'s key derivation has no href component, so a unit reporting both /filter/airdustfilter/vs/0 and /filter/deodorfilter/vs/0 would silently clobber one filter's reading with the other's -- the exact collision AIR_FILTER's own 'air_' prefix was chosen to avoid against WATER_FILTER's filter_usage/filter_status. Gives DEODOR_FILTER its own deodor_filter_usage/deodor_filter_status keys (status still shares the filter_status translation_key, same as AIR_FILTER already does). Updated the winecellar fixture's golden and test, and added deodor_filter_usage to all seven translation catalogs.
This commit is contained in:
10 files changed
+61
-9
No files matched your search
+2
-2
@@ -1,7 +1,5 @@
|
||||
{
|
||||
"state_keys": [
|
||||
"air_filter_status",
|
||||
"air_filter_usage",
|
||||
"alarm_code",
|
||||
"auto_door_opener",
|
||||
"auto_door_sound_control",
|
||||
@@ -9,6 +7,8 @@
|
||||
"auto_door_voice_control",
|
||||
"cabinet_light_dim",
|
||||
"cabinet_light_switch",
|
||||
"deodor_filter_status",
|
||||
"deodor_filter_usage",
|
||||
"door_winecellar_open",
|
||||
"energy_kwh",
|
||||
"energy_saved_kwh",
|
||||
|
||||
Reference in new issue
Block a user