Welcome to Incremental Social! Learn more about this project here!
Check out lemmyverse to find more communities to join from here!

klangcola ,

One way is to make a new "entity", that's not actually linked to your previous temperature sensor. I'm not familiar with how to tie them together in a "device" like how ZigBee2mqtt auto discovery does.

So just add a new "sensor"/"entity"

  - name: "Sala_battery"
    unique_id: "temp_sala_battery"
    state_topic: "zigbee2mqtt/temp_sala"
    value_template: "{{ value_json.battery }}"
    unit_of_measurement: "%"

Use MQTT Explorer to listen to your ZigBee2mqtt broker topic "zigbee2mqtt/temp_sala" to get the exact field name (battery, battery_state or some such)

CondorWonder ,

Zigbee2mqtt should do device auto discovery by default (it did for me and I didn’t have to do anything). Maybe you’ve turned something off? The alternative I can think of is to manually create and maintain device auto discovery records like https://stevessmarthomeguide.com/adding-an-mqtt-device-to-home-assistant/ shows (for example).

peregus OP ,

Zigbee2mqtt should do device auto discovery by default

It does, but this is a remore device and I don't wanna redirect all the homeassistant/# messages from zigbee2mqtt to my home MQTT broker.

CondorWonder ,

Then to link the entities together into a device you need to mimic the auto discovery, or you just have two split entities.

I suppose you could create a template entity with the battery as an attribute to see it in the details view, but you still need the entities with the raw data. I’d be more inclined to create the device with auto discovery, seems like a cleaner way to go.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • homeassistant@lemmy.world
  • incremental_games
  • meta
  • All magazines