Publish device name only at boot and api connection
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user