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

Better description for remaining duration #35

Open
Joba0112 opened this issue Nov 12, 2024 · 3 comments
Open

Better description for remaining duration #35

Joba0112 opened this issue Nov 12, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@Joba0112
Copy link

There is no description of the format of the remaining duration.

Is it in hours or minutes?

What is the format?

It's an input_number.~ and when it give a 2,5 will it create a 2,5 hours lasting window?

tnx

@suaveolent
Copy link
Collaborator

suaveolent commented Nov 13, 2024

Thanks, I will update the Readme.

The remaining_duration_entity_id is a reference to an entity which indicates how long the appliance is still allowed to run (The state needs to decrease constantly, otherwise it will run indefinitely). It should report back a duration, as described in https://www.home-assistant.io/integrations/sensor/ duration`.

So the state depends on the unit set for that sensor. E.g. for h and 2.5 it will assume 2.5 hours of remaining time.

@suaveolent suaveolent added the documentation Improvements or additions to documentation label Nov 25, 2024
@sas413
Copy link

sas413 commented Dec 16, 2024

Is 1 and 2 the same?
image
My use case is: electric vehicle, I calculate the time to charge and then find the perfect time for this time period. A static value for the duration is not helpful. So is it possible with 2 to have a sensor which gives the input for the time period?

If 1 and 2 are not the same: Is it possible to have a sensor as input for the duration?

@suaveolent
Copy link
Collaborator

In principle they describe the same functionality, however, with different outcomes.

1.) Static Duration: The duration marked with "1" is a fixed value. For example, if you set it to 1 hour, the integration will identify the cheapest hour within the specified time period for that day.
2.) The remaining duration can be seen like a counter. It refers to an entity that tracks how much longer the appliance is allowed to run. This entity's state should decrease consistently over time; otherwise, the appliance will continue running indefinitely.

For your use case, you calculate the total duration in advance and set it for the referenced entity. Once the appliance is turned on, you should continuously update the entity's state to reflect the remaining duration as it decreases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants