Skip to content

Commit

Permalink
Set config category for keypad and child lock
Browse files Browse the repository at this point in the history
  • Loading branch information
nattgris committed Apr 6, 2024
1 parent 9f33ab0 commit 842c0be
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/extension/homeassistant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,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
Expand All @@ -437,6 +438,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;
Expand Down

0 comments on commit 842c0be

Please sign in to comment.