Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for controlling a second relay for cooling. #441

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

HarmEllis
Copy link

I wanted to control heating and cooling from Home Assistant.

This change adds a second switch in Home Assistant, named 'switch.altherma_cooling', but only if the 'PIN_COOL' is defined in the 'setup.h' file.

The logic will prevent from switching heating and cooling on at the same time (although a Daikin Altherma Hybrid will prever heating over cooling if both are enabled). When switching cooling on while heating is on, heating will be turned off and vice versa.

I also refactored the 'callbackTherm' function to prevent duplicate code, since there can be two relays to control now.

I had one issue with this, it seems like somehow this inverts the relay active state. I changed mine from HIGH to LOW in 'setup.h' and after that everything was working properly. I could not find out why this changed though. Maybe someone else can test and confirm this behavior.

Also, I do not have a lot of c/ c++ or mqtt experience, feedback is always welcome!

Refactored the callbackTherm function to prevent duplicate code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants