Closed seanmccabe closed 9 months ago
Hi,
You can create a template sensor as a "workaround" for this.
I would publish as an attribute to the time entity, however Home Assistant doesn't allow overriding the additional state attributes property in the time platform currently.
{% set split_time = states('time.play_time_limit').split(':') %}
{{ ((split_time[0] | int) * 60)+(split_time[1] | int) - (states('sensor.used_screen_time') | int) }}
Not sure why I closed this now lol.
Just released a beta with a specific sensor for this.
Awesome thank you :)
The nintendo switch shows a remaining time which includes the bedtime alarm. Can you get the data via the api?
Checklist
Is your feature request related to a problem? Please describe.
Would like to be able to check how much playtime there is left.
Describe the solution you'd like
A datetime sensor with the amount of screen time remaining.
In essence. PlayTimeLimit - UsedScreenTime.
Describe alternatives you've considered
Have attempted to create custom sensors, but the current two attributes are different types, and I would prefer to see this information in the one view, under the integration.
Additional context
N/A