Skip to content

Commit

Permalink
fix!: HA permit join switch: disable automatically after 254 seconds (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Koenkk committed Dec 1, 2024
1 parent 98b9770 commit 3220b27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/extension/homeassistant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2206,7 +2206,8 @@ export default class HomeAssistant extends Extension {
state_topic_postfix: 'info',
value_template: '{{ value_json.permit_join | lower }}',
command_topic: `${baseTopic}/request/permit_join`,
payload_on: 'true',
state_on: 'true',
payload_on: '{"value": true, "time": 254}',
payload_off: 'false',
},
},
Expand Down
3 changes: 2 additions & 1 deletion test/homeassistant.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2801,7 +2801,8 @@ describe('HomeAssistant extension', () => {
state_topic: 'zigbee2mqtt/bridge/info',
value_template: '{{ value_json.permit_join | lower }}',
command_topic: 'zigbee2mqtt/bridge/request/permit_join',
payload_on: 'true',
state_on: 'true',
payload_on: '{"value": true, "time": 254}',
payload_off: 'false',
origin: origin,
device: devicePayload,
Expand Down

0 comments on commit 3220b27

Please sign in to comment.