dlarrick / hass-kumo

Home Assistant module interfacing with Mitsubishi mini-split units
MIT License
99 stars 23 forks source link

Adding sensors for some simple attributes measured by Kumo units #113

Closed barndawgie closed 1 year ago

barndawgie commented 1 year ago

I modeled the below on existing code you had for head unit wi-fi signal as I'm not much of a python dev. It seems to work but I'm very open to feedback.

I couldn't figure out an easy/good way to determine if there was a sensor and thus always create disabled entities for the Humidity, Sensor Battery, and Sensor RSSI sensors; is there some has_sensor() call I could be making and just didn't see in pykumo?

barndawgie commented 1 year ago

I have tested these with my setup. I have a few PAC-USWHS003-TH-1 sensors rather than a MHK control unit.

dlarrick commented 1 year ago

Sorry for the delay in replying here.

Communication with the indoor units is notoriously fickle, especially these days with the problems seen in #105 . So I would hate to base a decision about whether to create a sensor on our ability to properly query the indoor unit at startup. So I think your approach of creating them disabled and letting people enable if they like, is a good one. Another fancier approach would be to provide toggles in the setup, but IMHO that's more than is required.

A couple notes though:

barndawgie commented 1 year ago

I believe I've addressed all of your requested changes. Thanks!

dlarrick commented 1 year ago

Thanks, will review this week.