jseidl/hass-magic_areas

Bug: Presence hold timeout not long enough

Closed this issue · 5 comments

Describe the bug
The presence hold timeout feature is useful in case someone forgets to turn off Presence Hold once they no longer need it. However, the highest number that the configuration screen will let me enter is 9999 which is only 2.778 hrs. I was trying to enter 28800 which I believe is 8 hours, but the input turns red and prevents me from continuing after I enter a 5th digit.

To Reproduce
Steps to reproduce the behavior:

  1. Configure an area with a presence hold switch
  2. Try and enter a presence hold timeout larger than 9999 seconds

Expected behavior
It should allow for much larger numbers, or perhaps it should use minutes instead of seconds.

Additional context
It seems to me people might want to have a long Presence Hold period, but still use the timeout feature. My desire currently is for 8 hours, but I could easily see someone wanting a presence hold timeout of 24 hours, or maybe even longer.

In re-evaluating this request, perhaps it should be classified as an enhancement vs a bug, because I'm not sure what the original intention was as far as the upper bounds of the timeout.

This is probably something that would be fixed by changing the timeouts from seconds to minutes, which would make more sense in that directive.

The bad thing is that is not backwards compatible so people would have to update, which is not a dealbreaker but it makes it so it has to go in a major release.

I'm up for this and it's being tracked here #254, make sure you upvote!

Oh totally, changing from seconds to minutes would be great! I upvoted that issue, looking forward to that hopefully making it in!

Could async_migrate_entry be used when updating to the newer version to migrate existing seconds values to minutes automatically?

Could async_migrate_entry be used when updating to the newer version to migrate existing seconds values to minutes automatically?

Possibly! Although I never messed with it, have to take a look at it

jseidl commented

This is being tracked on #254, please upvote. I am strongly inclined to doing this one but it's a breaking change so I'm waiting until I get the new naming convention out (still 1 or 2 releases out) so I make all the breaking changes at once.