Publish device name only at boot and api connection

This commit is contained in:
Edward Firmo
2024-12-20 21:00:24 +01:00
parent e1b8469aa5
commit 55cde35d31
2 changed files with 9 additions and 0 deletions

View File

@@ -100,6 +100,11 @@ script:
# - HW Touch # - HW Touch
- id: boot_sequence - id: boot_sequence
mode: restart
then:
- script.execute: publish_device_info
- id: publish_device_info
mode: restart mode: restart
then: then:
- lambda: |- - lambda: |-
@@ -155,6 +160,7 @@ text_sensor:
entity_category: diagnostic entity_category: diagnostic
internal: false internal: false
disabled_by_default: false disabled_by_default: false
update_interval: never
lambda: |- lambda: |-
return {"${name}"}; return {"${name}"};
filters: filters:

View File

@@ -13,6 +13,9 @@
--- ---
api: api:
id: api_server id: api_server
on_client_connected:
then:
- script.execute: publish_device_info
script: script:
- id: !extend button_action - id: !extend button_action