Fix issue #787 - #788
Conversation
…imes fix(text): 🩹 rename the DHW schedule entities to blocking times
Previously end block time 24:00 wasn't valid. But the HP accepts and parses this as "the end of day"
|
Thanks for digging into this and sending a PR straight away — much appreciated. You're right that The problem is what happens after validation.
If we let What I'd like to do instead: accept
|
|
after you changed it to 24:00 in the webUI, what does the entity in HA show as end time? |
|
It does show as 24:00 in HA if I enter that in the WebUI or the HP itself. It's how I figured out what I had to enter for 'end of day' after a couple of tries like 0:00. |
|
|
when I try to set 24:00 as end time on heatpump24.com, I get "Input data out of bounds. Please try again." |
|
I think 24:00 as 'end of day' is much more intuitive tbh. Especially because we're defining a scheme for the whole day. But I can't vouch for all other Luxtronic devices if it works. |
|
Also I'm at 3.92.3 on a MSW2-9S |
|
The only other approach I see would be to make this behavior dependant on something, like manufacturer or firmware. EDIT: Crossposted... |
|
Yeah, I can see that being a complicated decision. I'll leave that in your (probably more capable) hands! I'll report tomorrow to tell if it only became active during the two 'open' hours when I enter 0:00 as end of day. |
|
Thanks for testing both — that was genuinely useful, and one of your answers changed my mind about what's going on. Your pump really does store 86400. You're the first unit I've seen do it: an MSW2-9S on V3.92.3 that accepts Your That difference is also why I can't ship the regex-only version even though it works for you. On your pump 86400 is storable, so the write confirms and everything looks fine. On a pump that clamps it to What I'd like to build insteadFour small changes that behave correctly on both our pumps, with no manufacturer or firmware gating anywhere: 1. Accept _PAIR_PATTERN = re.compile(r"^([01]\d|2[0-3]):[0-5]\d-(([01]\d|2[0-3]):[0-5]\d|24:00)$")2. Normalize it to return [
(entry[:5], "00:00" if entry[6:] == "24:00" else entry[6:])
for entry in entries
]3. Preserve whatever the device holds on the way in. No normalization on read — if your register contains 86400, HA shows 4. Treat both spellings as equal when deciding what to write, in _MIDNIGHT = {"00:00", "24:00"}
current_end = get_sensor_data(data, f"parameters.{end_name}")
if current_end != end and not (current_end in _MIDNIGHT and end in _MIDNIGHT):
writes.append((end_name, end))That last one matters specifically for you. Without it, once your register holds 86400, editing any other row in the same block would see What this means for you in practiceStraight answer, including the part you won't love:
On which notation is more intuitive — I'd honestly say One housekeeping thingThis PR currently targets Thanks again — the report was right, and your testing is what made the fix correct rather than just plausible. |








🔍 What this fixes
Fixes pair times not parsing 'end time' 24:00.
✨ Changes
Only changes the text.py _PAIR_PATTERN regex.
🧪 Tests
Tested the regex on time pairs.