Bouni / luxtronik

Luxtronik integration for Home Assistant
MIT License
82 stars 13 forks source link

Device Registry #4

Open mtdcr opened 3 years ago

mtdcr commented 3 years ago

Maybe it could be beneficial to move sensors away from the luxtronik domain to using the Device Registry with standard binary_sensor and sensor domains.

Probably incomplete list of benefits:

Bouni commented 3 years ago

Hi,

to be honest, i never looked into this and used other integrations as kind of a template to create this one. If you want to submit a PR that would be great :-)

I plan to overhaul the entire integration at some point in the not to far future anyway because I would like to integrate a GUI based setup to make it more easy for the users to work with the integration. So your request could be part of it but I have no idea when I will start with that.

mtdcr commented 3 years ago

To move sensors to the default sensor domain, I think you'd just need to remove def entity_id(self). HA will derive an entity_id from the entity's name then.

In the meantime I've noticed that using the Device Registry requires moving to a ConfigEntry-based setup, i.e. async_setup_entry. That's also a prerequisite for GUI-based configuration, so deferring it until then makes sense.