hristo-atanasov / Tasmota-IRHVAC

Home Assistant platform for controlling IR Air Conditioners via Tasmota IRHVAC command and compatible hardware
196 stars 67 forks source link

Case mismatch issues #4

Closed Wihanh closed 4 years ago

Wihanh commented 4 years ago

I had this working well, but when using the remote, HA wouldn't update on the status. so it only worked one way. After looking at the code i noticed a few things, the Vendor and Model needs to be an exact match. My model was left to default of 1, but the IR code was -1, i changed this, still no good. I then turned on debugging for the component and noticed i never get: _LOGGER.debug("we have a match") Although i do get the 2 payloads in the log. I realized that my vendor was set to lower case mitsubishi_heavy_88 and it was comparing it against the IR code that was being output as MITSUBISHI_HEAVY_88. Once I fixed the code in the config in HA to be all upper case, it worked a treat. This is in case someone else has this issue. Make sure your model and Vendor match exactly. If still fails, turn on debugging for this component and check the logs.

hristo-atanasov commented 4 years ago

@Wihanh Why your protocol is set in lowercase? In configuration.yaml, you have to set it exactly like you have copied it from tasmota console result, after scanning you remote IR code.

Wihanh commented 4 years ago

It was just a mistake from my end.
What made it hard to find is it worked fine to control AC, even with protocol lower case. So it seems when transmitting to AC, lower case is ok, but when receiving from the AC remote, it isn't. I suppose you can just convert all vendors to upper before comparing in code. That would make it more robust. I just wrote this in case someone has a similar issue. Thanks for writing this component.