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
input_datetime - timestamp attribute is incorrect #13396
Comments
I suspect this might be due to timezones... Do you have time zone set as in https://home-assistant.io/docs/configuration/basic/? |
Yup, Europe/London. All my times and everything display correctly, it's just the timestamp that is an hour out. We go to British Summer Time in the UK in 27 hours, so by all means wait for that and I'll let you know if it corrects when in BST or not. |
Ooh - interesting to note, this... trigger:
platform: template
value_template: "{{ states('sensor.time') == (states.input_datetime.bedroom_alarm_clock_time.attributes.timestamp | int | timestamp_custom('%H:%M', False)) }}" still triggers the alarm clock at the right time, so I'm totally baffled. Only 5 hours until BST, I'll update tomorrow whether it changes anything... |
Arghhhh - so, I worked this out (sort of) and it's not an issue - It was staring me in the face the whole time. I don't know what the boolean 'false' does in the second example I gave, but if included the calculation works as expected - so I'll close this issue, but if anyone feels like explaining what the boolean is for and why it needs to be set to false to get the correct time I would appreciate it just for my own curiosity. Thanks all. |
Make sure you are running the latest version of Home Assistant before reporting an issue.
You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:
Home Assistant release (
hass --version
):0.65.6
Python release (
python3 --version
):3.6.4
Component/platform:
input_datetime
Description of problem:
The timestamp attribute of the input_datetime's are an hour out. There was this issue - #10784 - (that I opened ages ago, and was fixed) where they were displaying an hour out, but this is different. Trying to use the timestamp attribute to do a calculation on the time does not work correctly.
Expected:
Timestamp to be correct.
Problem-relevant
configuration.yaml
entries and steps to reproduce:{{ (states.input_datetime.my_test.attributes.timestamp) | timestamp_custom("%H:%M") }}
The text was updated successfully, but these errors were encountered: