Zigbee2mqtt bad gateway with conbee 2

if using discovery everything appears in entities.

thanks. I checked once more, but I dont see any Frient entity, even having clicked the ‘change homeassistant friendly_name’ checkbox.

not a single sensor or switch from the Z2M server is created, only mqtt topics? maybe I need an extra setting somewhere?

Set homeassistant: true and restart zigbee2mqtt

yes, thats what I have done… few times, and still no entities in sight.

Did manage to set the discovery topic though:

advanced:
  homeassistant_discovery_topic: zigbee2mqtt

nicely adds all under the 1 key in mqtt explorer:

and the user: and password: options allow to separate the logins on the broker easily, I feel that is a much underestimated option.

for now I remain in quest for the entities… :wink:

Does not change the fact that homeassistant itself still listens on homeassistant to discover devices.

Homeassistant configuration.yaml :

mqtt:
  broker: x.x.x.x
  port: 1883
  discovery: true
  discovery_prefix: homeassistant

yeah well, I dont use discovery , because way too many topics :wink: this simply cleans the mqtt explorer window for me.

which now makes it all clear: thats why there are no entities…? duh. :blush:

indeed. Entities are created through mqtt auto-discovery.

1 Like

ok, this has been a while, please help me out… creating individual mqtt sensor on my HA instances, I test with:

  - platform: mqtt
    state_topic: 'zigbee2mqtt/Frient test switch'
    unique_id: frient_test_switch
    name: Frient test switch

which subscribes to

and {{states('sensor.frient_test_switch')}} nicely returns:

{
  "current": 0.04,
  "energy": 0,
  "linkquality": 135,
  "power": 6,
  "state": "ON",
  "voltage": 222.59
}

now how do I add the template to get to the individual attributes there:

  - platform: mqtt
    state_topic: 'zigbee2mqtt/Frient test switch'
    unique_id: frient_switch_power
    name: Frient switch power
    value_template: >
      {{value.power|float}}
    <<: *power

must be easy but my head is spinning right now… hope you can have a look thanks!

EDIT:
nevermind, it was easy :wink:

  - platform: mqtt
    state_topic : 'zigbee2mqtt/Frient test switch'
    name: Frient switch power
    unique_id: 0x0015bc002f00e485_power_zigbee2mqtt
    value_template: >
      {{ value_json.power|float }}  # <-- needed to add _jason 

sorry for bothering and the (though related) off topic.

tip: the ‘config’ topics which Zigbee2mqtt creates for all entities hold all necessary info (and more) ready to use, so we don’t even have to find out ourselves. really very cool.

1 Like

Thank you too - I thought it had to go into configuration.yaml of HA - mine is now working after hours of frustration

@ francispFrancis
Dear francisp,

thank you for your hint with the adapter. Now it works for me.

Best regards

Peer

Thank you so much. Just like the others I thought it is the configuration.yaml of HomeAssistant. Thanks to you it is working now! Cheers!

This comment was clutch. I have been looking for solutions for a week and I simply had to turn off the ConBee II Zigbee integration I was using before Zigbee2mqtt.

1 Like