-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Add Support for Luxtronik2 heatpumps #86636
Conversation
@frenck You've said (here) that a integration for Luxtronik controllers should support all versions and you don't want to have seperate integartions vor different versions of that controller. |
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Still open! |
How can we make sure someone takes this up for review? Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gave some comments on the initial files in the beginning.
There seems to be a bit off cleaning needed.
Also needs to remove translations and other legacy things as it's been here for a while I think
from .const import CONF_COORDINATOR, DOMAIN, PLATFORMS | ||
from .coordinator import LuxtronikCoordinator | ||
|
||
# endregion Imports |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# endregion Imports |
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: | ||
"""Set up Luxtronik from a config entry.""" | ||
|
||
hass.data.setdefault(DOMAIN, {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hass.data.setdefault(DOMAIN, {}) |
data = hass.data.setdefault(DOMAIN, {}) | ||
data[entry.entry_id] = {} | ||
data[entry.entry_id][CONF_COORDINATOR] = coordinator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data = hass.data.setdefault(DOMAIN, {}) | |
data[entry.entry_id] = {} | |
data[entry.entry_id][CONF_COORDINATOR] = coordinator | |
hass.data.setdefault(DOMAIN, {})[entry.entry_id] = coordinator |
Can set the coordinator directly there as you probably aren't going to store anything else
# Trigger a refresh again now that all platforms have registered | ||
hass.async_create_task(coordinator.async_refresh()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Trigger a refresh again now that all platforms have registered | |
hass.async_create_task(coordinator.async_refresh()) |
No need
# Trigger a refresh again now that all platforms have registered | ||
hass.async_create_task(coordinator.async_refresh()) | ||
|
||
# hass.config_entries.async_setup_platforms(entry, PLATFORMS) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# hass.config_entries.async_setup_platforms(entry, PLATFORMS) |
# endregion Imports | ||
|
||
|
||
PORT_SELECTOR = vol.All( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set the NumberSelector
directly in STEP_USER_DATA_SCHEMA
and then convert to int in validation or when reading the value
def _get_options_schema() -> vol.Schema: | ||
"""Build and return the options schema.""" | ||
return vol.Schema({}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this?
"""Return config entry title.""" | ||
return self._title | ||
|
||
async def async_step_options( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this meant to do and why not part of the normal user step?
async def async_step_init( | ||
self, user_input: dict[str, Any] | None = None | ||
) -> FlowResult: | ||
"""Manage the options.""" | ||
return await self.async_step_user(user_input) | ||
|
||
async def async_step_user(self, user_input=None) -> FlowResult: | ||
"""Handle a flow initialized by the user.""" | ||
if user_input is not None: | ||
return self.async_create_entry(title="", data=user_input) | ||
coordinator = LuxtronikCoordinator.connect(self.hass, self.config_entry) | ||
title = f"{coordinator.manufacturer} {coordinator.model} {coordinator.serial_number}" | ||
name = f"{title} ({self.config_entry.data[CONF_HOST]}:{self.config_entry.data[CONF_PORT]})" | ||
return self.async_show_form( | ||
step_id="user", | ||
data_schema=_get_options_schema(), | ||
description_placeholders={"name": name}, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not appear to give the user any chance to change anything?
) | ||
|
||
|
||
# config_entry_flow.register_discovery_flow(DOMAIN, "Luxtronik", _async_has_devices) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# config_entry_flow.register_discovery_flow(DOMAIN, "Luxtronik", _async_has_devices) |
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
There hasn't been any activity on this pull request recently. This pull request has been automatically marked as stale because of that and will be closed if no further activity occurs within 7 days. |
Bumping to keep the review alive. The extension works perfectly in my setup, have been using it for more than a year. Thanks! |
Because there hasn't been any activity on this PR for quite some time now, I've decided to close it for being stale. Feel free to re-open this PR when you are ready to pick up work on it again 👍 |
Breaking change
The hacs integration Bouni/luxtronik has the same domain. Perhaps it conflict. Please upgrade Bouni/luxtronik to the latest version to ensure the changed and current domain.
This integration replaces the custom_component integration BenPru/luxtronik. The config and sensor keys are compatible and are converted. But the yaml configuratin is ignored. Please use Bouni/luxtronik if you wan't use yaml configuration.
Proposed change
Add new integration to read out and control a luxtronik2 heatpump.
Manufacturers that use Luxtronik heat pump controllers are: Alpha Innotec, Siemens Novelan, Roth, Elco, Buderus, Nibe and Wolf Heiztechnik.
The full integration is currently available as custom_component BenPru/luxtronik.
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
Open
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: