From a38065b399051fe9387b21e7ddb46bc9533e9051 Mon Sep 17 00:00:00 2001 From: Andreas Fritiofson Date: Sun, 4 Jun 2023 15:31:32 +0200 Subject: [PATCH 1/2] Fix indicator_mode entity category Exposed as enum, not binary. --- lib/extension/homeassistant.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/extension/homeassistant.ts b/lib/extension/homeassistant.ts index 5b900bb254..0a39739f82 100644 --- a/lib/extension/homeassistant.ts +++ b/lib/extension/homeassistant.ts @@ -652,7 +652,6 @@ export default class HomeAssistant extends Extension { expose_pin: {entity_category: 'config', icon: 'mdi:pin'}, flip_indicator_light: {entity_category: 'config', icon: 'mdi:arrow-left-right'}, gas: {device_class: 'gas'}, - indicator_mode: {entity_category: 'config', icon: 'mdi:led-on'}, invert_cover: {entity_category: 'config', icon: 'mdi:arrow-left-right'}, led_disabled_night: {entity_category: 'config', icon: 'mdi:led-off'}, led_indication: {entity_category: 'config', icon: 'mdi:led-on'}, @@ -977,6 +976,7 @@ export default class HomeAssistant extends Extension { device_mode: {entity_category: 'config', icon: 'mdi:tune'}, effect: {enabled_by_default: false, icon: 'mdi:palette'}, force: {entity_category: 'config', icon: 'mdi:valve'}, + indicator_mode: {entity_category: 'config', icon: 'mdi:led-on'}, keep_time: {entity_category: 'config', icon: 'mdi:av-timer'}, identify: {device_class: 'identify'}, keypad_lockout: {entity_category: 'config', icon: 'mdi:lock'}, From 0d05ea9290ccc1b90b272f4733bd4d62e1a50031 Mon Sep 17 00:00:00 2001 From: Andreas Fritiofson Date: Sun, 4 Jun 2023 15:52:54 +0200 Subject: [PATCH 2/2] Set config category for keypad and child lock --- lib/extension/homeassistant.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/extension/homeassistant.ts b/lib/extension/homeassistant.ts index 0a39739f82..12606eddc6 100644 --- a/lib/extension/homeassistant.ts +++ b/lib/extension/homeassistant.ts @@ -459,6 +459,7 @@ export default class HomeAssistant extends Extension { discoveryEntry.discovery_payload.payload_lock = state.value_on; discoveryEntry.discovery_payload.payload_unlock = state.value_off; discoveryEntry.discovery_payload.state_topic = true; + discoveryEntry.discovery_payload.entity_category = 'config'; discoveryEntry.object_id = 'keypad_lock'; } else if (state.property === 'child_lock') { // deprecated: child_lock is messy, but changing is breaking @@ -468,6 +469,7 @@ export default class HomeAssistant extends Extension { discoveryEntry.discovery_payload.state_locked = 'LOCK'; discoveryEntry.discovery_payload.state_unlocked = 'UNLOCK'; discoveryEntry.discovery_payload.state_topic = true; + discoveryEntry.discovery_payload.entity_category = 'config'; discoveryEntry.object_id = 'child_lock'; } else { discoveryEntry.discovery_payload.state_locked = state.value_on;