Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Home Assistant MQTT Discovery: Verify an Entity Before an Automation

Description and use

The test confirms that a known message updates the intended entity in Home Assistant and that a temporary automation can observe the state transition.

Problem

Confirm that a known test message creates or updates the intended entity and that a harmless automation can observe the update.

Outcome

The test demonstrates that a known test message updates the intended entity and that a temporary automation can observe the state transition, providing evidence to continue cautiously.

Workflow

  • Record the discovery topic, state topic, entity ID, and expected test value.
  • Publish or confirm the lab discovery configuration, then find the resulting entity.
  • Send "check-1" on the exact state topic and record the entity state and time.
  • Send "check-2", then confirm that the state changed again.
  • Create and enable a temporary automation with a state trigger for the lab entity’s transition from "check-1" to "check-2" and a notification or log entry as its only action. Publish "check-1" followed by "check-2" again on the exact state topic, then verify that the resulting automation trace identifies the expected state trigger and that the notification or log entry exists.
  • Disable or remove the automation and clean up the lab discovery configuration when the check is complete.

Evidence

MQTT discovery can make a Home Assistant entity appear quickly. That's useful, but seeing an entity card is just the first check.

Source

The test doesn't certify a device, establish its availability, or prove that a real-world action completed.

Source

Create or choose a clearly labeled lab entity on a broker you control.

Source

Publish one harmless, unambiguous state value through the declared state topic, such as check-1 if the entity configuration accepts text.

Source

Once you've seen the state change, create a temporary automation that watches only the lab entity.

Source

  • Record date: 2026-10-26T11:11:11.538Z