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

Add touchlinesl integration #124557

Merged
merged 11 commits into from
Aug 27, 2024
Merged

Add touchlinesl integration #124557

merged 11 commits into from
Aug 27, 2024

Conversation

jnsgruk
Copy link
Contributor

@jnsgruk jnsgruk commented Aug 25, 2024

Breaking change

This PR introduces a new integration for the Roth Touchline SL underfloor heating system.

It supports reading temperature, humidity and preset, based on the pytouchlinesl library which I published earlier this week.

The system supports a constant target temperature per zone, and also has a number of "global schedules". In this integration, the "Presets" for the climate zone represent the configured global schedules.

See below some screenshots of the integration when connected to my TouchlineSL module:
image
image
image

Documentation PR to follow for the integration.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

Copy link

@home-assistant home-assistant bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jnsgruk

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@joostlek
Copy link
Member

There already is an integration for touchline, what's the difference?

@MartinHjelmare MartinHjelmare changed the title integrations(touchlinesl): init integration Add touchlinesl integration Aug 25, 2024
@jnsgruk
Copy link
Contributor Author

jnsgruk commented Aug 25, 2024

There already is an integration for touchline, what's the difference?

Touchline SL is essentially a completely different product - the original Touchline module speaks to the old controller over the LAN, whereas Touchline SL is controlled through an internet facing public API and has more features - the two are unfortunately not compatible 🙂

@joostlek
Copy link
Member

Check. If it's ready for review, please mark it so

@jnsgruk
Copy link
Contributor Author

jnsgruk commented Aug 25, 2024

Check. If it's ready for review, please mark it so

Done - I was just waiting until I'd got the docs and brands PRs together, which are now at:

homeassistant/components/touchlinesl/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/touchlinesl/config_flow.py Outdated Show resolved Hide resolved
homeassistant/components/touchlinesl/climate.py Outdated Show resolved Hide resolved
homeassistant/components/touchlinesl/climate.py Outdated Show resolved Hide resolved
homeassistant/components/touchlinesl/climate.py Outdated Show resolved Hide resolved
homeassistant/components/touchlinesl/climate.py Outdated Show resolved Hide resolved
homeassistant/components/touchlinesl/config_flow.py Outdated Show resolved Hide resolved
@home-assistant home-assistant bot marked this pull request as draft August 25, 2024 16:02
@jnsgruk jnsgruk marked this pull request as ready for review August 26, 2024 09:23
@home-assistant home-assistant bot requested a review from joostlek August 26, 2024 09:23
@jnsgruk
Copy link
Contributor Author

jnsgruk commented Aug 26, 2024

@joostlek I think I've addressed all of your feedback, thanks for the tips!

I've made changes in two separate commits - let me know if you'd like me to squash down into a single commit again - I wanted to leave them separate so it was easy to see the changes I was making in response to our conversation.

@joostlek
Copy link
Member

You can just leave your commits like that, in the end we squash them and merge them in one go. Squashing and force pushing only messes up the GitHub diff

Copy link
Member

@joostlek joostlek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are your future plans with the integration? Do you want to add more platforms? Based on that I might actually want to recommend using a coordinator. Using a coordinator centralizes the polling mechanism to a single component and it could help you clean up the updating part

@joostlek
Copy link
Member

Oh and also please checkout fujitsu_fglair on how they added a brand. touchline already is an integration, so we can group them by manufacturer

@jnsgruk jnsgruk requested a review from joostlek August 27, 2024 08:09
@jnsgruk jnsgruk marked this pull request as ready for review August 27, 2024 08:10
@jnsgruk
Copy link
Contributor Author

jnsgruk commented Aug 27, 2024

@joostlek I think I've addressed all bar one piece of feedback 🙂

@joostlek
Copy link
Member

I'll have another pass after I've done my groceries. Feel free to send me a message on discord :)

@joostlek
Copy link
Member

Do you have a link to the one piece? (That saves me going through everything, and you already know which one :) )

@jnsgruk
Copy link
Contributor Author

jnsgruk commented Aug 27, 2024

Do you have a link to the one piece? (That saves me going through everything, and you already know which one :) )

#124557 (comment)

Thank you!

homeassistant/components/touchline_sl/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/touchline_sl/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/touchline_sl/climate.py Outdated Show resolved Hide resolved
homeassistant/components/touchline_sl/config_flow.py Outdated Show resolved Hide resolved
@home-assistant home-assistant bot marked this pull request as draft August 27, 2024 08:58
Copy link
Member

@joostlek joostlek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm missing a test where we add a config entry with the same unique_id and test we abort if we set up again

tests/components/touchline_sl/test_config_flow.py Outdated Show resolved Hide resolved
tests/components/touchline_sl/test_config_flow.py Outdated Show resolved Hide resolved
tests/components/touchline_sl/test_config_flow.py Outdated Show resolved Hide resolved
tests/components/touchline_sl/test_config_flow.py Outdated Show resolved Hide resolved
tests/components/touchline_sl/test_config_flow.py Outdated Show resolved Hide resolved
tests/components/touchline_sl/test_config_flow.py Outdated Show resolved Hide resolved
tests/components/touchline_sl/test_config_flow.py Outdated Show resolved Hide resolved
tests/components/touchline_sl/test_config_flow.py Outdated Show resolved Hide resolved
tests/components/touchline_sl/test_config_flow.py Outdated Show resolved Hide resolved
tests/components/touchline_sl/test_config_flow.py Outdated Show resolved Hide resolved
tests/components/touchline_sl/test_config_flow.py Outdated Show resolved Hide resolved
tests/components/touchline_sl/test_config_flow.py Outdated Show resolved Hide resolved
@joostlek joostlek marked this pull request as ready for review August 27, 2024 10:27
@home-assistant home-assistant bot requested a review from joostlek August 27, 2024 10:27
@joostlek joostlek merged commit 9119884 into home-assistant:dev Aug 27, 2024
39 of 40 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants