parse_device0_batch used to collapse /device/0's {"href": "..."} "no data
yet" marker into a plain {}, indistinguishable from a resource the device
had actually polled and confirmed empty. Every exists_fn using the "not
rep or ..." stub carve-out (and entity._is_included's default field-gate)
then treated both the same way, creating phantom always-"unknown" entities
for any resource a model simply doesn't support (e.g. GSzabados's fridge's
/energy/consumption/vs/0).
is_stub_rep() now recognizes only the literal {"href": ...} marker as a
stub; a genuine {} is treated as the device's real (if empty) answer and
gates the entity off like any other missing field. Updated the energy
meter, self-check error, cooktop burner, and range-hood auto-operation
exists_fn call sites, plus three golden fixtures that had baked the
phantom-entity behavior in as "expected".
19 lines
297 B
JSON
19 lines
297 B
JSON
{
|
|
"state_keys": [
|
|
"airflow_fan",
|
|
"alarm_code",
|
|
"clean_level",
|
|
"device_active",
|
|
"diagnosis_status",
|
|
"display_light",
|
|
"dust",
|
|
"fan_direction",
|
|
"filter_progress",
|
|
"fine_dust",
|
|
"odor",
|
|
"operating_mode",
|
|
"power_switch",
|
|
"super_fine_dust"
|
|
]
|
|
}
|