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

[FR] blind-control and clock-timer: Allow to define for a rule two times (from AND until) #357

Open
Hypnos3 opened this issue Nov 10, 2021 · 0 comments
Assignees
Labels
💡 enhancement New feature or request

Comments

@Hypnos3
Copy link
Collaborator

Hypnos3 commented Nov 10, 2021

For the sake of understanding it might be easier if you could not only set the rules until OR from, but could set 2 times with which both are possible.

  • No longer a until / from selection for times
  • 1st definable time always the from time
  • 2st definable time always the until time

This would also make it possible to create rules that are active beyond a change of day. That would be the case if the time of until is less than the time of from.

The restrictions could be problematic:

  • only on certain days of the week / months, even / odd days; even / odd week; from / to date.

Possible solutions:

  1. Restrictions can only be defined once (regardless of the two times).
  • During the test, these only apply to one of the defined times.
    • If 1st time is defined, then the rule is valid for these from time - 2nd defined time will not be checked
    • If 1st time is not defined, then the rule is valid for the 2nd defined until time
    • Problematic could this be, for rules that are active beyond a change of day.
      • Example, if a rule is from 22:00 to 02:00 and only valid on Mondays. - Then a rule will be valid on Monday 22:00 to Tuesday 02:00.
        • The Problem is how this could be visualized properly in the rule edit dialog.
      • Alternative could be to check both times if both times are defined.
        • Example, if a rule is from 22:00 to 02:00 and only valid on Mondays. - Then a rule will be get never valid, because on Sunday the 2nd time is valid, but not the 1st. On Monday the 1st time is valid, but not the 2nd.
        • In a case for rules that are active beyond a change of day always needs to be at lease 2 following days defined.
        • What about month limiation? - The rule never gets valid on the first day of selected month if the previous month is not selected and never gets valid on the last day of the selected month if the next month is not selected.
          • This is not really understandable for a user.
        • What about date frame limiation? - The rule never becomes valid on the first or last day of the selected date range. Maybe internally could be the date range starts one day earlier and end 1 day later in such a case if the rule is active beyond a change of day
        • In Edge cases this is getting too complicated and does not add to the understanding.
  1. Restrictions can be defined on both times.
    • How should this be resolved? - Is the rule only valid if the restrictions apply to both times?
    • This is getting too complicated and does not add to the understanding.

Backward compatibility / migration:

  • If the rule is a until rule, this becomes the 1st defined time
  • If the rule is a from rule, this becomes the 2nd defined time
  • If the 1st rule is set to none/not defined, the text "midnight or previous rule" could be displayed .
  • If the rule only has one time, the other is set to "midnight or previous / next rule".

Source: Clock-Timer: Regeln über Tageswechsel?

@Hypnos3 Hypnos3 self-assigned this Nov 10, 2021
@Hypnos3 Hypnos3 added the 💡 enhancement New feature or request label Nov 10, 2021
@Hypnos3 Hypnos3 changed the title [FR] Allow to define for a rule from AND until [FR] Allow to define for a rule two times (from AND until) Nov 10, 2021
@Hypnos3 Hypnos3 changed the title [FR] Allow to define for a rule two times (from AND until) [FR] blind-control and clock-timer: Allow to define for a rule two times (from AND until) Nov 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 enhancement New feature or request
Development

No branches or pull requests

1 participant