Creating Entity with attributes

Hello,

if the entity is created with mqtt auto discovery i get it with attributes

If i create entity manual i get only state
image
So is there a way to make them also with attributes?

Thanks a lot!

Which integration are you using to create the entity?

1 Like

Sorry, under manual i mean configuration.yaml
In right this case it is mqtt sensor of zigbee2mqtt.

Mqtt is the integration. Sorry I should have known that from “mqtt discovery”

You have to add the attributes topic and value template: https://www.home-assistant.io/integrations/sensor.mqtt/#json_attributes_template

1 Like

Oh, looks like exact what i need! Thanks a lot!

So it depends on integration as i understood, and for example with input_boolean or switch it is not to realize?

Correct. e.g. An mqtt switch does support attributes a command line switch does not.