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

Time Offset field missing from automations Time Trigger when entity is of type input_datetime #23752

Closed
3 of 4 tasks
IWR69 opened this issue Jan 15, 2025 · 1 comment
Closed
3 of 4 tasks

Comments

@IWR69
Copy link

IWR69 commented Jan 15, 2025

Checklist

  • I have updated to the latest available Home Assistant version.
  • I have cleared the cache of my browser.
  • I have tried a different browser to see if it is related to my browser.
  • I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.

Describe the issue you are experiencing

From the image below you can see that I am unable to add a time offset if the time triggers entity is of type input_datetime (Date/Time Helper that is configured to hold both date and time - dev tools state: 2025-01-05 14:00:00) but it works fine for entity type sensor (Template Sensor Helper that returns as_datetime - dev tools state: 2025-01-05T13:55:00+00:00).

Image

yaml:

  - at: sensor.octopus_power_ups_export_end_time
    id: octopus_power_ups_export_end_time
    trigger: time
  - at: input_datetime.octopus_power_ups_start_time
    id: octopus_power_ups_export_start_time
    trigger: time

Describe the behavior you expected

Both entities are date times so both should allow an offset to be added when used in a time trigger.

Steps to reproduce the issue

(1) Create a new automation and add a time trigger and select a template sensor helper that returns a date & time. You will be able to add an offset here:
(2) Add a second time trigger and select a date/time helper (configured to hold both date and time). You will not be able to set an offset for this trigger.

What version of Home Assistant Core has the issue?

2025.1.2

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue?

Firefox 134.0

Which operating system are you using to run this browser?

Windows 11

State of relevant entities

Octopus Power-ups Export End Time: (Template Sensor Helper - this one works)
State: 2025-01-05T13:55:00+00:00
device_class: timestamp
friendly_name: Octopus Power-ups Export End Time

Octopus Power-ups Start Time: (Date/Time Helper containing both date and time - this does not work)
State: 2025-01-05 14:00:00
has_date: true
has_time: true
editable: true
year: 2025
month: 1
day: 5
hour: 14
minute: 0
second: 0
timestamp: 1736085600
icon: mdi:battery-clock
friendly_name: Octopus Power-ups Start Time

Problem-relevant frontend configuration

Javascript errors shown in your browser console/inspector

Additional information

No response

@karwosts
Copy link
Contributor

Not a frontend bug, time triggers do not support offsets on input_datetime.

If you add one via yaml, backend will reject saving the automation.

Message malformed: Expected HH:MM, HH:MM:SS, an Entity ID with domain 'input_datetime' or 'sensor', a combination of a timestamp sensor entity and an offset, or Limited Template @ data['at'][0]

If/when this changes, this option can be added to the frontend.

@karwosts karwosts closed this as not planned Won't fix, can't repro, duplicate, stale Jan 15, 2025
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

No branches or pull requests

2 participants