-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Use more human-readable sensor names in Airly #86893
Conversation
@@ -80,15 +80,15 @@ class AirlySensorEntityDescription(SensorEntityDescription): | |||
AirlySensorEntityDescription( | |||
key=ATTR_API_PM1, | |||
device_class=SensorDeviceClass.PM1, | |||
name=ATTR_API_PM1, | |||
name="Particulate matter 1.0", |
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.
These names are pretty long, wouldn't PM 2.0 be easier to deal with in the UI?
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.
Looking at several other air quality integrations, they generally seem to name the sensor PM1.0, PM2.5, etc. (no space) so seems like that would be the most consistent way.
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.
As suggested, I changed these names. I also reverted CAQI
(instead of Common Air Quality Index
) because that name is also very long.
Side note:
Three other integrations use the names Particulate matter x.x
: tomorrowio
, tuya
and nam
.
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.
With a backend language in place it's the goal to eventually offer standard, pre-translated names for this.
These name changes seem questionable at first glance but I will defer to more knowledgeable devs for that decision. That said if they are valid they should be made in the P.S. Considering there are multiple components that refer to the same type of data around air quality it might be worth discussing standardizing those names in |
Breaking change
Proposed change
Use more human-readable sensor names.
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: