jmcollin78 / versatile_thermostat

A full featured Thermostat for Home Assistant: presets, window, motion, presence and overpowering management
MIT License
326 stars 34 forks source link

Implementing max_on_percent setting #632

Closed ms5 closed 3 days ago

ms5 commented 1 week ago

Implemented the max_on_percent expert level config to clamp the max ON time to a certain percentage of the cycle length. As discussed here https://github.com/jmcollin78/versatile_thermostat/discussions/602.

max_on_percent can be set in the configuration.yaml like this:

versatile_thermostat:
    max_on_percent: 0.8

I have also added tests, to check if the calculation is done correctly.

To avoid confusions, I also exposed the following attributes to HA:

max_on_percent
calculated_on_percent

Together with the already existing on_percent (which no can be clamped), all the informations are available to properly debug something if needed.

jmcollin78 commented 1 week ago

Hello @ms5,

Thank you for this, I will have a look until this week-end. I'm not at home this end of week.

ms5 commented 4 days ago

I have updated the README by creating a new Expert Mode section (as discussed), moved the existing expert mode settings there and added the new max_on_percent setting. Please have a look and tell me if you would like to have some changes.

Have a nice Sunday 🌞

jmcollin78 commented 3 days ago

Merged ! Will be in the next release.

ms5 commented 3 days ago

Awesome! Thank You!

jmcollin78 commented 3 days ago

https://github.com/jmcollin78/versatile_thermostat/releases/tag/6.8.0.beta3

You can isntall this preview release if you want. Give me some feedback if all is alright for you.

ms5 commented 3 days ago

I just had a look, but it seems the changes are not merged into the 6.8.0.beta3 tag.

jmcollin78 commented 3 days ago

You are right. I will fix that. I forgot the rebase the branch.

jmcollin78 commented 3 days ago

Should be fixed : https://github.com/jmcollin78/versatile_thermostat/releases/tag/6.8.0.beta4

ms5 commented 3 days ago

perfect! now it works. seems good so far.