-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 icons for new sensor device classes #13895
Conversation
src/common/const.ts
Outdated
@@ -121,6 +122,7 @@ export const FIXED_DEVICE_CLASS_ICONS = { | |||
carbon_monoxide: mdiMoleculeCo, | |||
current: mdiCurrentAc, | |||
date: mdiCalendar, | |||
distance: mdiSpeedometer, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would ruler not be better for distance?
distance: mdiSpeedometer, | |
distance: mdiRuler, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the icon to what was intended, but I agree @epenet's suggestion would work too:
Or maybe:
sulphur_dioxide: mdiMolecule, | ||
temperature: mdiThermometer, | ||
timestamp: mdiClock, | ||
volatile_organic_compounds: mdiMolecule, | ||
voltage: mdiSineWave, | ||
// volume: TBD, => no well matching icon found |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not ideal, but maybe mdiCupWater
or mdiCarCoolantLevel
as default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A very quick browse of the use VOLUME_*
constants shows that, where the context is clear, it's mostly either of:
- gas
- water
- vehicle fuel
For gas, there's already a gas device class of course, so it's pretty much either an amount of water or vehicle fuel
The cup is not a great fit for vehicle fuel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a good fit for water or fuel consumption though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
water makes me think of a leak
gauge makes me think of a speed
For car-coolant-level I don't like the name, but I do like the icon, which fits any liquid sploshing around in a container.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's hold off an icon and let's see over time what is being used by integrations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it fits an amount of liquid in a container, but it doesn't fit the amount of water you've used in your home, or the amount of fuel your car has used which seem to be the two most common uses for sensors measuring volumes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is OK to start with. We can always improve/change based on feedback provided by others in the future. Beta is close, and we should get some default in.
Hi Opposite, I left the existing icons in my PRs: home-assistant/core#79261, home-assistant/core#79263, home-assistant/core#79262, home-assistant/core#79253, home-assistant/core#79277, home-assistant/core#79285, home-assistant/core#77488 Same for @bdraco in home-assistant/core#79162 Do we need to go over these PRs a second time? |
https://developers.home-assistant.io/docs/core/entity/ If the icon provided by the device class is not confusing or misleading it should be removed. If there is no icon provided by the device class it should likely still be set. |
I reviewed my changes, and opened this PR: home-assistant/core#79348 |
Proposed change
Add icons for new sensor device classes
Type of change
Example configuration
Additional information
Checklist
If user exposed functionality or configuration variables are added/changed: