adorobis / hacomfoairmqtt

Home Assistant integration for ComfoAir 350 device via serial communication and MQTT
MIT License
37 stars 16 forks source link

Add Home Assistant device discovery #28

Closed PimDoos closed 2 years ago

PimDoos commented 2 years ago

Adds support for Home Assistant device discovery. Overhaul on the autodiscovery code. Adds some device_class and icons to the sensors.

This makes the ComfoAir device visible in the 'Device' option in Home Assistant. image

PimDoos commented 2 years ago

This is currently a breaking change as using 'comfoair' as the device name changes all entity ids from ca350_{name} to comfoair_{name}. Will update default config to keep it at CA350 for now.

PimDoos commented 2 years ago

These sensors will remain a breaking change, as they have been renamed by their display name:

PimDoos commented 2 years ago

Now with climate image

adorobis commented 2 years ago

Looks great, let me test it later today. Many thanks for another contribution!

adorobis commented 2 years ago
  • ca350_exhausttemp --> ca350_exhaust_temperature
  • ca350_outsidetemp --> ca350_outside_temperature
  • ca350_returntemp --> ca350_return_temperature
  • ca350_supplytemp --> ca350_supply_temperature
  • ca350_fan_speed_supply --> ca350_supply_fan_speed
  • ca350_fan_speed_exhaust --> ca350_exhaust_fan_speed

I'm just testing now. Above sensors have not been renamed, device is now discovered by MQTT integration but no entities are linked to it: image Not sure what's wrong, will try to figure it out.

adorobis commented 2 years ago

I think in the auto discovery of sensors the entity ids are still the old ones so most likely some more things are missing.

adorobis commented 2 years ago

OK, HA restart was required. All works ok, thanks!

PimDoos commented 2 years ago

Thanks for merging! I noticed we still need to update the README.md to reflect the new configuration options and entity names. I'll submit a PR for that in a bit.