Hi,
I know this question has already been asked but it doesn’t answer to my case. I’m pretty new to HA and I don’t understand everything yet.
A long time ago I builded an adapter that makes Sony Control AII protocol available in an MQTT broker, to remotly send commands and control / automate my old Receiver. It works like a charm but now I want to integrate it to HA, but, I don’t understand how. With my actual setup I can control input channel, volume, power, and many other. I saw that in HA I can add a custom MQTT bynary sensor, switch… but not as a single device, and I want all state and commands to be in the same device, not just have on off… Can someone explain me where I’m wrong please ? I don’t know if my question is really clear but, thanks by advance for your advices.
Devices in home assistant are comprised of entities. An entity in home assistant is a single state. Entities can have numerous attributes associated with that single state.
You can create all 3 from MQTT discovery. Home assistant relies on a configuration for a device or entity. If that configuration doesn’t exist, it doesn’t know what topics are associated with that device or entity.
You can keep your current setup to automate your receiver, all you need to do is establish a configuration for home assistant to know how to handle your device.
Through YAML, you can only create entities. Through MQTT automatic discovery, you can create whatever you want (including devices).
Thanks for your answer.
If I understand well, I’m better to rewrite my MQTT implementation to match HA MQTT Discovery specification, and then, if well setup, my Receiver will show up with a device that has many entities, that’s right ?
Thanks for your link
your topics and data shouldn’t change. You need to ADD discovery information as a topic that follows the discovery protocol. Follow the link I provided from top down and hopefully you’ll understand what you need to add.
But you basically need 2 things:
- A configuration via a topic
- A topic(s) that contain(s) your sensors data that’s continuously updated.
Home assistant then configures it self using #1. That configuration pulled from #1 tells home assistant what the data is for #2. Home assistant then creates the sensor for #2 and uses #2 to update said sensor.
Ooooh, yeah I understand now ! I’m going to try it. Many thanks, Have a nice day !
hey there! would you be able to link to some documentation that you used to help build out your discovery packet? or would you be able to share your packets that you crafted? I’m struggling to find documentation on this but this is similar to what I want to do, too!
Hey/Salut
It would have been very keen to you to share your work, like the configuration used to create that Device.
Best, cordialement.
David.