Skip to content

Proposal: Add sensor device classes#14010

Merged
pvizeli merged 1 commit intodevfrom
sensor-device-class
Apr 20, 2018
Merged

Proposal: Add sensor device classes#14010
pvizeli merged 1 commit intodevfrom
sensor-device-class

Conversation

@balloob
Copy link
Copy Markdown
Member

@balloob balloob commented Apr 20, 2018

Description:

We should add device classes to sensors, just like we have for binary sensors.

Previously, we would try to distinguish / group sensors by unit of measurement in, for example, the history panel in the frontend. However, this can result in a graph that contains both battery levels and humidity (both %).

As an example, I've updated 3 sensors.

We will update the frontend to recognize device classes for sensors and automatically assign icons.

I think that we should be a little conservative in adding device classes. We should only add them for the ones that are common.

@MartinHjelmare
Copy link
Copy Markdown
Member

We could also use this to group data for data collectors like influxdb and datadog. Limitation is that the device class isn't available per state attribute.

@dgomes
Copy link
Copy Markdown
Contributor

dgomes commented Apr 20, 2018

Just checking: this will impact history panel only for now ?

@balloob
Copy link
Copy Markdown
Member Author

balloob commented Apr 20, 2018

It will impact nothing yet because history panel has not been updated yet.

Copy link
Copy Markdown
Member

@pvizeli pvizeli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a cool idea to cleanup/sort all this sensor data

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.

5 participants