[api] Test api.connected without options and with a lambda (#20835)

This commit is contained in:
J. Nick Koston
2026-10-17 15:23:35 -10:00
committed by GitHub
parent af5efabdc6
commit 5df6c65cc2
+11
View File
@@ -5,6 +5,17 @@ esphome:
condition:
api.connected:
state_subscription_only: true
- if:
condition:
api.connected:
then:
- logger.log: "API client connected"
- if:
condition:
api.connected:
state_subscription_only: !lambda "return true;"
then:
- logger.log: "API client subscribed to states"
- homeassistant.event:
event: esphome.button_pressed
data: