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
- id: boot_sequence
mode: restart
then:
- script.execute: publish_device_info
- id: publish_device_info
mode: restart
then:
- lambda: |-
@@ -155,6 +160,7 @@ text_sensor:
entity_category: diagnostic
internal: false
disabled_by_default: false
update_interval: never
lambda: |-
return {"${name}"};
filters:

View File

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