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

Add support for timestamp device class #2087

Merged
merged 1 commit into from
Nov 23, 2018
Merged

Add support for timestamp device class #2087

merged 1 commit into from
Nov 23, 2018

Conversation

balloob
Copy link
Member

@balloob balloob commented Nov 23, 2018

This adds support for sensors with the timestamp device class. This way sensors can just publish the timestamp and we are going to compute the time. This way we can finally stop people from updating a state in the state machine every second and killing their DB, then blaming us history is slow 🤷‍♂️

Architecture issue for device class: home-assistant/architecture#39

Docs PR: home-assistant/home-assistant.io#7606

Added all the format options one could ever dream off:

Format Example
relative 5 minutes ago
total 5 minutes
date November 23, 2018
time 11:02
datetime November 23, 2018, 11:02

(all localized with users language)

timestamp sensor

@balloob balloob merged commit a7ab652 into dev Nov 23, 2018
@balloob balloob deleted the timestamp-sensor branch November 23, 2018 18:38
@ghost ghost removed the in progress label Nov 23, 2018
@balloob balloob mentioned this pull request Dec 5, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants