Status Change Triggers

Hi,

Still yet to try ESPHome however want to go that way. I’m just wondering (looking at using on Sonoff Mini and Shelly 1):

When a physical switch is used with one of these devices, does ESPHome ‘push’ the status change to HA, or does HA periodically ‘pull’ the status from the ESPHome device? The reason I’m asking is because I want a really quick automation fire based on a physical switch linked to a Shelly 1/Sonoff Mini.

I’ve read that Tasmota can be configured to send an MQTT message to mosquitto on status change and was just wondering if ESPHome does anything similar.

I have some TP-Link HS100s and their status doesn’t seem to ‘push’ to HA, it looks like HA periodically ‘pulls’ the status. This means that if I wanted to use the on/off manual switch on the HS100 to trigger an automation, it takes several seconds for HA to see the status change and fire the automation.

Thanks!

If you are talking about the ESPHome integration, according to the docs HA will be notified as soon as an event occurs. If you look on the right if the integration page it says IoT class: Local Push. Clicking on the little “i” symbol explains the meaning:

Local Push: Offers direct communication with device. Home Assistant will be notified as soon as a new state is available.

Most (every?) integration has a classifier on its doc page. For example, as you’ve observed TP-Link is Local Polling.

2 Likes

Got it, thanks. Didn’t notice that! Great tip.