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

support CURRENT_HVAC_* #30

Closed nao-pon closed 3 years ago

nao-pon commented 3 years ago

By returning an appropriate value with hvac_action(), the icon color etc. will be displayed properly in the UI.

hristo-atanasov commented 3 years ago

Please, tell me more about what problem does this PR solves!

nao-pon commented 3 years ago

Due to this PR, the color of the entity icon changes depending on the operation mode of the unit. It is orange when heating, light blue when cooling, and gray (default) when OFF. This allows you to see the status of the unit at a glance.

hristo-atanasov commented 3 years ago

Described functionality is working fine. No need of this PR. If you don't see colors use more recent version of the component. If this doesn't work again use color display instead of monochromatic one.

nao-pon commented 3 years ago

No, I tried with the latest components. The results are as follows. icon_color_0

The results of applying this patch are as follows: Notice the change in the color of the icon. icon_color

hristo-atanasov commented 3 years ago

Ok! I got it! I didn't even notice this icon until you posted these images. I'll open and accept the PR, but I'll make a small change, as we don't need all CURRENTHVAC modes. We need only fan plus these finishing to "ing": heating, cooling and drying. Others are exactly the same like HVACMODE, so we just return the self._current_mode. Also we don't need to return None at the end, as self._current_mode is always one of the hvac modes.

nao-pon commented 3 years ago

@hristo-atanasov Thanks for your merge. Also, thank you for developing a great component!