Compare commits

...
Author SHA1 Message Date
Matysh 8c083be665 fix: exclude error channels from appliance lifecycle roles
Validate / docs (push) Failing after 24s
Validate / changes (push) Successful in 46s
Validate / hacs (push) Skipped
Validate / hassfest (push) Skipped
Validate / provenance (push) Successful in 50s
Validate / backend (push) Skipped
Validate / process-gate (push) Failing after 52s
Validate / frontend (push) Successful in 5m5s
Validate / golden (push) Failing after 1m22s
Validate / performance_smoke (push) Failing after 9m5s
Validate / smoke (push) Failing after 17m1s
An `error_status` sensor matches the `*_status` allowlist segment, so a
fault channel reporting `active` painted the marker as working, and with a
live `status` peer the winner depended on registry order. `error` joins the
same stop-list as connectivity telemetry (code review #164, finding M1); the
connectivity rejection unit now carries an active fault channel alongside a
real lifecycle peer.

Issue: #164
User-Visible: no
2026-08-17 08:55:34 +03:00
5 changed files with 16 additions and 7 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
File diff suppressed because one or more lines are too long
+5 -1
View File
@@ -104,7 +104,11 @@ const LIFECYCLE_ROLE_RANK = new Map<string, number>([
['machine_state', 1], ['running_state', 1],
['status', 2], ['device_status', 2], ['machine_status', 2],
]);
const LIFECYCLE_CONNECTIVITY_SEGMENTS = new Set(['wifi', 'connection', 'signal', 'battery']);
// `error` sits here for the same reason as connectivity telemetry: an
// `error_status` sensor describes a fault channel, not the appliance
// lifecycle, and its `active` value must not paint the marker as working —
// nor may registry order let it outrank a real `status` peer (review #164 M1).
const LIFECYCLE_CONNECTIVITY_SEGMENTS = new Set(['wifi', 'connection', 'signal', 'battery', 'error']);
/** Rank a strict appliance lifecycle entity from generic HA metadata.
* Russian/localised display text is deliberately not authority in #164. */
+5
View File
@@ -442,6 +442,9 @@ test('resolvedDeviceStateEntities: lifecycle matching rejects connectivity and l
'sensor.washer_wifi_status': {
entity_id: 'sensor.washer_wifi_status', original_name: 'WiFi Status',
},
'sensor.washer_error_status': {
entity_id: 'sensor.washer_error_status', translation_key: 'error_status',
},
'sensor.washer_localised': { entity_id: 'sensor.washer_localised' },
'sensor.washer_run_state': {
entity_id: 'sensor.washer_run_state', entity_category: 'config',
@@ -457,6 +460,8 @@ test('resolvedDeviceStateEntities: lifecycle matching rejects connectivity and l
'switch.washer_power': { state: 'on', attributes: {} },
'switch.washer_child_lock': { state: 'off', attributes: {} },
'sensor.washer_wifi_status': { state: 'connected', attributes: {} },
// a fault channel reporting `active` must not become the working signal
'sensor.washer_error_status': { state: 'active', attributes: {} },
'sensor.washer_localised': { state: 'start', attributes: { friendly_name: 'Статус' } },
'sensor.washer_run_state': { state: 'start', attributes: {} },
'sensor.washer_stage': { state: 'Rinse', attributes: {} },