Multi sensor using same MQTT topic

Glad to hear you found the source of the problem (misnamed sensor entity).

Regarding the second approach, it is more efficient when a single MQTT topic is used by many sensors. Imagine you have 20 sensors, all using the same topic:

  • In the first approach, the incoming payload is processed 20 times, once by each of the 20 sensors.
  • In the second approach, the incoming payload is processed twice, first by the automation and then by just one of the 20 sensors.

The second approach also centralizes all processing/reformatting of the incoming data (as opposed to the first approach where each sensors has its own separate template).

I described the two approaches in the following topic. Although it refers to the Sonoff RF Bridge, it applies to any source that uses one MQTT topic to transmit data from multiple devices (and/or parameters).

3 Likes