8000 Use micro sign "\u00b5" instead of Greek small letter mu "\u03bc" for micro unit prefix (alt 2) by jbouwh · Pull Request #144898 · home-assistant/core · GitHub
[go: up one dir, main page]

Skip to content

Use micro sign "\u00b5" instead of Greek small letter mu "\u03bc" for micro unit prefix (alt 2) #144898

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

Draft
wants to merge 3 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion homeassistant/components/aranet/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class AranetSensorEntityDescription(SensorEntityDescription):
key="radiation_rate",
translation_key="radiation_rate",
name="Radiation Dose Rate",
native_unit_of_measurement="μSv/h",
native_unit_of_measurement="µSv/h",
state_class=SensorStateClass.MEASUREMENT,
suggested_display_precision=2,
scale=0.001,
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/fyta/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class FytaSensorEntityDescription(SensorEntityDescription):
FytaSensorEntityDescription(
key="light",
translation_key="light",
native_unit_of_measurement="μmol/s⋅m²",
native_unit_of_measurement="µmol/s⋅m²",
state_class=SensorStateClass.MEASUREMENT,
value_fn=lambda plant: plant.light,
),
Expand Down
6 changes: 3 additions & 3 deletions homeassistant/components/number/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,19 +268,19 @@ class NumberDeviceClass(StrEnum):
"""

PM1 = "pm1"
"""Particulate matter <= 1 μm.
"""Particulate matter <= 1 µm.

Unit of measurement: `µg/m³`
"""

PM10 = "pm10"
"""Particulate matter <= 10 μm.
"""Particulate matter <= 10 µm.

Unit of measurement: `µg/m³`
"""

PM25 = "pm25"
"""Particulate matter <= 2.5 μm.
"""Particulate matter <= 2.5 µm.

Unit of measurement: `µg/m³`
"""
Expand Down
6 changes: 3 additions & 3 deletions homeassistant/components/sensor/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,19 +298,19 @@ class SensorDeviceClass(StrEnum):
"""

PM1 = "pm1"
"""Particulate matter <= 1 μm.
"""Particulate matter <= 1 µm.

Unit of measurement: `µg/m³`
"""

PM10 = "pm10"
"""Particulate matter <= 10 μm.
"""Particulate matter <= 10 µm.

Unit of measurement: `µg/m³`
"""

PM25 = "pm25"
"""Particulate matter <= 2.5 μm.
"""Particulate matter <= 2.5 µm.

Unit of measurement: `µg/m³`
"""
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/smartthings/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ class SmartThingsSensorEntityDescription(SensorEntityDescription):
"ccf": UnitOfVolume.CENTUM_CUBIC_FEET,
"lux": LIGHT_LUX,
"mG": None,
"μg/m^3": CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
"µg/m^3": CONCENTRATION_MICROGRAMS_PER_CUBIC_METER,
"kPa": UnitOfPressure.KPA,
}

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/xiaomi_aqara/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
),
"bed_activity": SensorEntityDescription(
key="bed_activity",
native_unit_of_measurement="μm",
native_unit_of_measurement="µm",
device_class=None,
state_class=SensorStateClass.MEASUREMENT,
),
Expand Down
4 changes: 2 additions & 2 deletions homeassistant/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ class UnitOfTemperature(StrEnum):
class UnitOfTime(StrEnum):
"""Time units."""

MICROSECONDS = "μs"
MICROSECONDS = "µs"
MILLISECONDS = "ms"
SECONDS = "s"
MINUTES = "min"
Expand Down Expand Up @@ -911,7 +911,7 @@ class UnitOfPrecipitationDepth(StrEnum):
# Concentration units
CONCENTRATION_MICROGRAMS_PER_CUBIC_METER: Final = "µg/m³"
CONCENTRATION_MILLIGRAMS_PER_CUBIC_METER: Final = "mg/m³"
CONCENTRATION_MICROGRAMS_PER_CUBIC_FOOT: Final = "μg/ft³"
CONCENTRATION_MICROGRAMS_PER_CUBIC_FOOT: Final = "µg/ft³"
CONCENTRATION_PARTS_PER_CUBIC_METER: Final = "p/m³"
CONCENTRATION_PARTS_PER_MILLION: Final = "ppm"
CONCENTRATION_PARTS_PER_BILLION: Final = "ppb"
Expand Down
2 changes: 1 addition & 1 deletion tests/components/aranet/test_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async def test_sensors_aranet_radiation(
temp_sensor_attrs[ATTR_FRIENDLY_NAME]
== "Aranet\u2622 12345 Radiation Dose Rate"
)
assert temp_sensor_attrs[ATTR_UNIT_OF_MEASUREMENT] == "μSv/h"
assert temp_sensor_attrs[ATTR_UNIT_OF_MEASUREMENT] == "µSv/h"
assert temp_sensor_attrs[ATTR_STATE_CLASS] == "measurement"

interval_sensor = hass.states.get("sensor.aranet_12345_update_interval")
Expand Down
8 changes: 4 additions & 4 deletions tests/components/fyta/snapshots/test_sensor.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,15 @@
'supported_features': 0,
'translation_key': 'light',
'unique_id': 'ce5f5431554d101905d31797e1232da8-0-light',
'unit_of_measurement': 'μmol/s⋅m²',
'unit_of_measurement': 'µmol/s⋅m²',
})
# ---
# name: test_all_entities[sensor.gummibaum_light-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Gummibaum Light',
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
'unit_of_measurement': 'μmol/s⋅m²',
'unit_of_measurement': 'µmol/s⋅m²',
}),
'context': <ANY>,
'entity_id': 'sensor.gummibaum_light',
Expand Down Expand Up @@ -995,15 +995,15 @@
'supported_features': 0,
'translation_key': 'light',
'unique_id': 'ce5f5431554d101905d31797e1232da8-1-light',
'unit_of_measurement': 'μmol/s⋅m²',
'unit_of_measurement': 'µmol/s⋅m²',
})
# ---
# name: test_all_entities[sensor.kakaobaum_light-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Kakaobaum Light',
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
'unit_of_measurement': 'μmol/s⋅m²',
'unit_of_measurement': 'µmol/s⋅m²',
}),
'context': <ANY>,
'entity_id': 'sensor.kakaobaum_light',
Expand Down
12 changes: 6 additions & 6 deletions tests/components/smartthings/snapshots/test_diagnostics.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -854,12 +854,12 @@
'dustSensor': dict({
'dustLevel': dict({
'timestamp': '2021-04-06T16:44:10.122Z',
'unit': 'μg/m^3',
'unit': 'µg/m^3',
'value': None,
}),
'fineDustLevel': dict({
'timestamp': '2021-04-06T16:44 CF15 :10.122Z',
'unit': 'μg/m^3',
'unit': 'µg/m^3',
'value': None,
}),
}),
Expand Down Expand Up @@ -994,7 +994,7 @@
'veryFineDustSensor': dict({
'veryFineDustLevel': dict({
'timestamp': '2021-04-06T16:43:38.529Z',
'unit': 'μg/m^3',
'unit': 'µg/m^3',
'value': None,
}),
}),
Expand Down Expand Up @@ -1260,12 +1260,12 @@
'dustSensor': dict({
'dustLevel': dict({
'timestamp': '2021-04-06T16:43:35.665Z',
'unit': 'μg/m^3',
'unit': 'µg/m^3',
'value': None,
}),
'fineDustLevel': dict({
'timestamp': '2021-04-06T16:43:35.665Z',
'unit': 'μg/m^3',
'unit': 'µg/m^3',
'value': None,
}),
}),
Expand Down Expand Up @@ -1521,7 +1521,7 @@
'veryFineDustSensor': dict({
'veryFineDustLevel': dict({
'timestamp': '2021-04-06T16:43:35.363Z',
'unit': 'μg/m^3',
'unit': 'µg/m^3',
'value': None,
}),
}),
Expand Down
Loading
0