haier-ac-remote icon indicating copy to clipboard operation
haier-ac-remote copied to clipboard

HomeAssistant HomeKit Controller Compatibility - might be an easy fix

Open Nixellion opened this issue 4 years ago • 2 comments

Hi!

Currently it is quite easy to integrate Haier AC into HomeAssistant using this homebridge plugin, as HomeAssistant has HomeKit Controller.

However there is a very serious issue, where only one of the AC entities is properly added into HomeAssistant. I raised this issue on HomeAssistant github and they told me that the reason for that is because haier-ac-remote plugin does not set unique identifier. And looking at the code, indeed it literally manually sets it to "Undefined". It's supposedly a 1-line fix here:

https://github.com/bstuff/haier-ac-remote/blob/7276b957d356fd173ea658164526fd4071e41d23/packages/homebridge-haier-ac/src/haier.ts#L56

As Hass dev noted:

If they set the serial number to config.mac instead of 'Undefined' then it likely would work.

Here's link to discussion on HomeAssistant github: https://github.com/home-assistant/core/issues/50811

Nixellion avatar May 18 '21 13:05 Nixellion

Went ahead and made a PR: https://github.com/bstuff/haier-ac-remote/pull/30

Nixellion avatar May 18 '21 14:05 Nixellion

Hi, HomeAssistant dev here (specifically for the homekit_controller integration). Happy to confirm this is a correct summary of my conversations with @Nixellion - providing a unique and stable identifier like config.mac as the Serial Number will allow Home Assistant to use this Home Bridge plugin. Cheers.

Jc2k avatar May 18 '21 14:05 Jc2k