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

Support new date, time and date/time entities in Home Assistant #2267

Closed
mill1000 opened this issue Jun 7, 2023 · 7 comments · Fixed by esphome/esphome#6513
Closed

Support new date, time and date/time entities in Home Assistant #2267

mill1000 opened this issue Jun 7, 2023 · 7 comments · Fixed by esphome/esphome#6513
Assignees

Comments

@mill1000
Copy link

mill1000 commented Jun 7, 2023

Describe the problem you have/What new integration you would like

The latest Home Assistant release (2023.6) just added support for integrations to provide date, time and date/time entities.

Quote from the release announcement.

These entities allow integrations to provide date, time, or date/time input controls from the UI. They are very similar to the input datetime helper but are available for use by integrations.

I would like to see ESPHome support these entities so we can have UI configuration for time automation.

Please describe your use case for this integration and alternatives you've tried:

I currently implement a solution using a input_datetime helper with a Home Assistant attribute sensor to pull in the timestamp and then make comparisons using an on_time trigger every minute.

At very least, it would be nice if ESPHome could provide the date, time or date/time entities even if they don't integrate automatically with the on_time trigger. This would at least eliminate the need to manually create and link an input_datetime to the device.

Additional context

#1333 also made a similar request, but there wasn't HA support at the time. The linked alarm clock example utilizes a similar solution to the one I described above.

@jesserockz jesserockz self-assigned this Jun 8, 2023
@jesserockz
Copy link
Member

I have started working towards this.

@nagyrobi
Copy link
Member

@jesserockz How do we use this?
I mean what's requested in #2100 and #1004 so we can specify a time/date via a helper components, and that could time-trigger automations within ESPHome? Is that possible?

@mill1000
Copy link
Author

I don't this feature has been implemented yet.

@thargy
Copy link

thargy commented Jan 17, 2024

@jessrockz Is there any progress on this? We can add an Input Helper and text_sensor to do this, but it's clunky. The scenario I'm looking at is to allow me to set a timeout for a relay and know it will be honoured even if the HA connection goes down. It seems far better to tell the ESPHome instance when I want the relay to be switched off, rather than trusting that HA will be around to actually turn it off in the future (particularly for longer timeouts). A datetime sensor on ESPHome that I can set when I turn on the relay would allow the ESPHome code itself to check when the timer has expired and automatically turn off the relay.

@Unfocused
Copy link

Unfocused commented Mar 20, 2024

The start of this was just added in v2024.3.0:

So far it only supports the date type. No support for time type or datetime type yet.

@Unfocused
Copy link

time support is coming up:

@Unfocused
Copy link

Support for the time type will be in ESPHome 2024.4.0, which is currently in beta.

The final piece is the datetime type (combining both date and time in one entity), which is being worked on in this PR:

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

Successfully merging a pull request may close this issue.

5 participants