dawidchyrzynski / arduino-home-assistant

ArduinoHA allows to integrate an Arduino/ESP based device with Home Assistant using MQTT.
https://dawidchyrzynski.github.io/arduino-home-assistant/
GNU Affero General Public License v3.0
508 stars 119 forks source link

Request: Multi-mode switch #89

Closed daniloc closed 2 years ago

daniloc commented 2 years ago

Hello! Thanks for a great project.

I am integrating a Mitsubishi Heat Pump into Home Assistant, via IR signaling, and this project has made for a great start.

I've had success by composing multiple device types so far (HAHVAC and HASensor). But one primitive does not seem to exist in this library:

A multi-mode switch.

In the case of the Heat Pump, this would support things like:

Can you recommend a good direction for toggling between a series of integers, which I'll interpret as enum values for the various modes?

daniloc commented 2 years ago

Digging deeper, it seems that there's built in support in both Home Assistant's Climate integration, and in MQTT's Climate implementation, for both fan mode and swing mode.

So perhaps these enhancements would better target this library's HVAC implementation instead? I am finding the serialization mechanics a bit hard to follow, but it seems that @dawidchyrzynski is hard at work on enhancements on exactly that sub-system.

As I see you have not yet committed anything related to HVAC in that branch, @dawidchyrzynski, might I request you consider these additional functions when you get a moment for the HVAC device implementation?

Thanks so much for your time on all of this, it's such a great project.

dawidchyrzynski commented 2 years ago

Hi @daniloc,

I will research this feature and eventually implement it as part of the coming release - https://github.com/dawidchyrzynski/arduino-home-assistant/pull/81

dawidchyrzynski commented 2 years ago

Hi @daniloc,

The new HAHVAC implementation is already available on the serializer-refactor branch. Feel free to give it a go.