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 fil pilote #495

Draft
wants to merge 1 commit into
base: development
Choose a base branch
from
Draft

Conversation

NatMarchand
Copy link
Contributor

Add ApplianceType mixin for legrand modules supporting it
Make rooms with NLC radiator supporting climate
Change async_therm_set to add fil pilote value

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @NatMarchand - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟡 Complexity: 1 issue found
  • 🟢 Docstrings: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

src/pyatmo/room.py Outdated Show resolved Hide resolved
src/pyatmo/const.py Outdated Show resolved Hide resolved
src/pyatmo/modules/module.py Outdated Show resolved Hide resolved
@NatMarchand NatMarchand force-pushed the fil-pilote branch 3 times, most recently from ea2615a to d58dec6 Compare April 3, 2024 17:52
Add ApplianceType mixin for legrand modules supporting it
Make rooms with NLC radiator supporting climate
Change async_therm_set to add fil pilote value
@@ -121,6 +130,7 @@ async def async_therm_set(
self,
mode: str,
temp: float | None = None,
fp: str | None = None,
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is fp? Can we find a better name here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's fil pilote (Pilot wire in english ?)
I've chose this for the consistency with what's used in the API but I'd be eager to change :

For example the /homestatus endpoint returns this :

{
  status:"ok"
  time_server:1712686604
  body: {
    home: {
      id:"xxxx"
      rooms:[{
        id:"xxxx"
        therm_setpoint_end_time:1712693783
        therm_setpoint_fp:"frost_guard"
        therm_setpoint_mode:"home"
      }

Copy link
Collaborator

@cgtobi cgtobi Apr 9, 2024

Choose a reason for hiding this comment

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

I see, still I can't make much sense of that name. Not your fault, clearly, don't get me wrong. Could you explain the purpose? I can't make sense of the docs on that. Could it be 'Room heating configuration' or 'Home heating mode' (fp) vs. 'Heating schedule' (mode)?

Copy link
Contributor Author

@NatMarchand NatMarchand Apr 9, 2024

Choose a reason for hiding this comment

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

In France we have a standard for electric radiator which is fil pilote. It's a fourth wire which sends commands to a radiator (comfort, eco, frost guard, off).
When you have a Legrand cable outlet configured as a radiator, you can drive the radiator. However, in the API the command is configured on the room as you'd do for a thermostat (without a temperature).
That's what I'm trying to achieve on my PR : make the rooms available as thermostat in home assistant and be able to set commands on radiators.
It can be seen as a "room heating preset" and can be driven in the Legrand app by a schedule.
image

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we just name it something like pilot wire to have a speaking name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure ! Will do ;)

@lboue
Copy link
Contributor

lboue commented May 8, 2024

Any news on this request?

@NatMarchand
Copy link
Contributor Author

Any news on this request?

Still working on it, I ain't got much time to dedicate.
I tried to use my changes on my HomeAssistant, however I still have some strange behavior and need to fix them before.

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

3 participants