[api] Warn when Home Assistant actions are sent with no subscribed client (#17560)

This commit is contained in:
Jesse Hills
2026-07-15 23:11:47 +12:00
committed by GitHub
parent 4d3d06959b
commit b295b8d5a2
4 changed files with 124 additions and 3 deletions
@@ -0,0 +1,30 @@
esphome:
name: test-ha-action-no-subscriber
friendly_name: Home Assistant Action No Subscriber Test
on_boot:
# Fires before any client is connected - dropped with a warning.
- homeassistant.action:
action: test.boot_action
host:
api:
on_client_connected:
# Fires at authentication time, before the client has subscribed to
# Home Assistant actions - dropped with a warning.
- homeassistant.action:
action: test.connected_action
logger:
level: DEBUG
button:
- platform: template
name: Send Action Button
id: send_action_button
on_press:
# Pressed only after the client has subscribed - must be delivered.
- homeassistant.action:
action: test.button_action
data:
value: subscribed