Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95919

How to confgure MQTT sensors published by another homeassistant

$
0
0

@kenny wrote:

Hi,
I could like to “copy” some sensors from one homeassistant to another, so I configure “MQTT Statestream” on HASS A:


And try to configure a MQTT sensor on HASS B:

It looks like the sensor’s state is copied normally, but not its attributes, because “MQTT Statestream” separates sensor’s attributes to different topics.
For a real example, a sensor “pzemac_energy_peak” with an attribute “last_period”, I try to listen “homeassistant/sensor/pzemac_energy_peak/#” and can see:

Message 100 received on homeassistant/sensor/pzemac_energy_peak/state at 1:17 PM:
1.4
QoS: 0 - Retain: false

Message 101 received on homeassistant/sensor/pzemac_energy_peak/last_period at 1:17 PM:
"5.3"
QoS: 0 - Retain: false

So I configure a MQTT sensor “pzemac_test” on HASS B:

  - platform: mqtt
    name: pzemac_test
    state_topic: "homeassistant/sensor/pzemac_energy_peak/state"
    json_attributes_topic: "homeassistant/sensor/pzemac_energy_peak/last_period"

Then on HASS B I can see sensor.pzemac_test only have state “1.4”, but no matter how I modified the configuration, the attribute “last_period” won’t show out.

This problem really confusing me… I tried to search for times but can’t find any similar discussion over the internet… Does anyone has any idea? It will be much appreciated…

Posts: 8

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 95919

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>