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: Use number entities for time limits / bonus entities #84

Closed
3 of 4 tasks
drobtravels opened this issue Feb 20, 2024 · 4 comments · Fixed by #88
Closed
3 of 4 tasks

FR: Use number entities for time limits / bonus entities #84

drobtravels opened this issue Feb 20, 2024 · 4 comments · Fixed by #88
Assignees
Labels
enhancement New feature or request

Comments

@drobtravels
Copy link

Checklist

  • I have filled out the template to the best of my ability.
  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate feature request of previous feature requests.
  • This issue is a feature request to test other Nintendo Parental Controls mobile app configurations

Is your feature request related to a problem? Please describe.

First of all, thanks so much for making this integration! It's been useful.

I find the time entities clunky to interact with in the UI and confusing to set. For example the UI displays 12:00am for 0, and 2:00am for 2 hours.

It is also difficult to automate changes via the time.set_value service, since I believe this requires requires the HH:MM format.

Describe the solution you'd like

I propose number entities with the duration of time limit in minutes and bonus time.

This would allow sliders in the UI to slide from 0 to 120 minutes, and in my opinion, be more intuitive to interact. It would also simplify automations without complex templating.

I understand this would be a breaking change however.

Describe alternatives you've considered

I have started creating input_number helpers for the UI with automations to call time.set_value when changed, and update input_number when time changes.

I'm struggling to convert minutes to the correct format in a template, however. For example 120 minutes would require a time value of 2:00 or 02:00.

Additional context

Thanks so much

@drobtravels
Copy link
Author

I did figure out the right formatting to call time.set_value with the following template:
{{ (120|int*60)|timestamp_custom('%H:%M', false) }}

@pantherale0 pantherale0 added the enhancement New feature or request label Feb 22, 2024
@drobtravels
Copy link
Author

BTW, I'm happy to make a PR but wanted to check in for guidance first since this would be a major change.

@pantherale0
Copy link
Owner

Hi,

I have made a start on this and have a working version, trying to add an experimental option at the moment to enable / disable "untested" features (#76 #83).

Just been busy with work lately.

@pantherale0
Copy link
Owner

New update to be released soon:

image

@pantherale0 pantherale0 self-assigned this Mar 4, 2024
pantherale0 added a commit that referenced this issue Mar 4, 2024
@pantherale0 pantherale0 mentioned this issue Mar 4, 2024
pantherale0 added a commit that referenced this issue Mar 7, 2024
Fix exception for user screen time sensor #87 
Fix authentication issues - #86 
Replace time entities with number entities - #84  
Remove bonus time - #81
Update readme - #89 
---------

Co-authored-by: Rob <robert.mclellan+github@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants