Closed PetziAt closed 5 months ago
This is a valid request. I need to check how much effort it is.
It would be enough to provide an entity for duration. Best solution is template :)
I have implemented that in my fork just after the initial revision of this sensor came out: https://github.com/grol-hass/ha_epex_spot_sensor_variable_duration Feel free to pull changes from there.
I'm using it to determine when to charge my home battery from grid, that's why I also added code to make sure intermittent time slots are adjacent if possible. Also note that I have just replaced the timedelta from the configuration page completely by a input_number entity field (needs to be in seconds) - but I guess that could be modified to use an option to choose between a hardcoded value or an entity (maybe also a template sensor)
@grol-hass Thanks for sharing. I will use this a template.
I like to request an alternate duration input based on an selectable (input_datetime) helper. This makes possible to include the duration offered from an device.