Skip to content

add ClimateController and additional sensors for IRCv2#463

Open
mpcaddy wants to merge 2 commits into
JoDehli:masterfrom
mpcaddy:climate-improvements
Open

add ClimateController and additional sensors for IRCv2#463
mpcaddy wants to merge 2 commits into
JoDehli:masterfrom
mpcaddy:climate-improvements

Conversation

@mpcaddy

@mpcaddy mpcaddy commented Jan 10, 2026

Copy link
Copy Markdown
  • Made some improvements to the IRCv2
  • Added the Climate Controller with events to allow for the IRC to know whether they are heating or cooling
  • Also added a couple of sensors from the IRCv2 to know the override reason
  • Added a switch to be able to trigger the comfort override (To mimic the button on the app)
  • Added a Schedule preset to go back to the scheduled preset

May need some adjustments to the Climate Controller demand, I think it is possible to connect multiple to each IRC, so may need to track multiple demands

@mpcaddy mpcaddy marked this pull request as ready for review January 12, 2026 10:56
@mpcaddy

mpcaddy commented Jan 18, 2026

Copy link
Copy Markdown
Author

@JoDehli I'm pretty happy with how this is working so far, been running it for the last week. This is my first work on a homeassistant integration. Also my first time working on python code in quite a while

@JoDehli

JoDehli commented May 19, 2026

Copy link
Copy Markdown
Owner

@mpcaddy can you please update your branch if you want that i merge your work.

@mpcaddy mpcaddy force-pushed the climate-improvements branch from 1fbf499 to c9a0f2a Compare May 23, 2026 13:52
@mpcaddy

mpcaddy commented May 23, 2026

Copy link
Copy Markdown
Author

Hi @JoDehli I've rebased onto master

@JoDehli

JoDehli commented Jun 3, 2026

Copy link
Copy Markdown
Owner

@mpcaddy I tried your code. I do not use the room controller and it is difficult to decide if it is much better. But what I found out is that sometimes the added switch for Override can not be triggered and sometimes it can be triggered. Do you know this behavior?

@mpcaddy

mpcaddy commented Jun 3, 2026

Copy link
Copy Markdown
Author

@JoDehli I've not seen it not being triggered. I think there are some states which the override may not be able to trigger and it depends on what you have set up but I wasn't able to find any information on what states are possible.
I've only got heating set up on my room controller so it could be that it doesn't work correctly with heating.
Essentially I'm triggering what the button in the app does, although I don't know if it triggers different things when it's in different modes.

jmartasek added a commit to jmartasek/PyLoxone that referenced this pull request Jul 4, 2026
Fixes on top of climate-improvements (PR JoDehli#463):

1. Event listener lifecycle: Move bus.async_listen() from __init__ to
   async_added_to_hass() with async_on_remove() — prevents entity
   setup failures and memory leaks.

2. Dict mutation: Copy mode list before appending (avoids mutating
   shared kwargs). Separate IRoomControllerV2 loop in switch.py —
   without this, the climate platform cannot find IRoomControllerV2
   controls (switch runs first and would overwrite the type).

3. possibleCapabilities: Use .get() with default=3 instead of int()
   which crashes if the key is missing on older firmware.

4. climate_handler: Use .get() for safe key access on event data.

Co-Authored-By: Lilly Code <lillycode@lilly.com>
jmartasek added a commit to jmartasek/PyLoxone that referenced this pull request Jul 4, 2026
Based on the original PR JoDehli#463 work by @mpcaddy, this rework adds:

Fixes:
- Event listener lifecycle: async_added_to_hass() + async_on_remove()
- Mode list copied before mutating (avoids shared kwargs corruption)
- possibleCapabilities: .get() with default (older firmware compat)
- Separate IRoomControllerV2 loop in switch (avoids breaking climate)
- Safe .get() access in climate_handler

New features:
- Door/Window pause: shows as translated preset when openWindow active
- Entity categories: sensors = DIAGNOSTIC, override switch = CONFIG
- Translations: en/de/cs for preset mode names (schedule, paused)
- translation_key on LoxoneRoomControllerV2 for HA-native i18n
- Proper device grouping: all IRC entities share one HA device

Co-Authored-By: Lilly Code <lillycode@lilly.com>
jmartasek added a commit to jmartasek/PyLoxone that referenced this pull request Jul 5, 2026
Based on the original PR JoDehli#463 work by @mpcaddy, this rework adds:

Fixes:
- Event listener lifecycle: async_added_to_hass() + async_on_remove()
- Mode list copied before mutating (avoids shared kwargs corruption)
- possibleCapabilities: .get() with default (older firmware compat)
- Separate IRoomControllerV2 loop in switch (avoids breaking climate)
- Safe .get() access in climate_handler

New features:
- Door/Window pause: shows as translated preset when openWindow active
- Entity categories: sensors = DIAGNOSTIC, override switch = CONFIG
- Translations: en/de/cs for preset mode names (schedule, paused)
- translation_key on LoxoneRoomControllerV2 for HA-native i18n
- Proper device grouping: all IRC entities share one HA device

Co-Authored-By: Lilly Code <lillycode@lilly.com>
@mpcaddy mpcaddy force-pushed the climate-improvements branch from c9a0f2a to 9288194 Compare July 5, 2026 13:20
jmartasek added a commit to jmartasek/PyLoxone that referenced this pull request Jul 5, 2026
Based on the original PR JoDehli#463 work by @mpcaddy, this rework adds:

Fixes:
- Event listener lifecycle: async_added_to_hass() + async_on_remove()
- Mode list copied before mutating (avoids shared kwargs corruption)
- possibleCapabilities: .get() with default (older firmware compat)
- Separate IRoomControllerV2 loop in switch (avoids breaking climate)
- Safe .get() access in climate_handler

New features:
- Door/Window pause: shows as translated preset when openWindow active
- Entity categories: sensors = DIAGNOSTIC, override switch = CONFIG
- Translations: en/de/cs for preset mode names (schedule, paused)
- translation_key on LoxoneRoomControllerV2 for HA-native i18n
- Proper device grouping: all IRC entities share one HA device

Co-Authored-By: Lilly Code <lillycode@lilly.com>
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.

2 participants