mirror of
https://github.com/home-assistant/core.git
synced 2025-08-01 01:28:24 +00:00
Use b'\xc2\xb5' for micro sign instead of b'\xce\xbc`
This commit is contained in:
parent
11644d48ee
commit
8ab5296746
@ -92,7 +92,7 @@ SENSOR_DESCRIPTIONS = {
|
||||
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,
|
||||
|
@ -105,7 +105,7 @@ SENSORS: Final[list[FytaSensorEntityDescription]] = [
|
||||
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,
|
||||
),
|
||||
|
@ -265,19 +265,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³`
|
||||
"""
|
||||
|
@ -294,19 +294,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³`
|
||||
"""
|
||||
|
@ -1060,7 +1060,7 @@ UNITS = {
|
||||
"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,
|
||||
}
|
||||
|
||||
|
||||
|
@ -59,7 +59,7 @@ SENSOR_TYPES: dict[str, SensorEntityDescription] = {
|
||||
),
|
||||
"bed_activity": SensorEntityDescription(
|
||||
key="bed_activity",
|
||||
native_unit_of_measurement="μm",
|
||||
native_unit_of_measurement="µm",
|
||||
device_class=None,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
|
@ -684,7 +684,7 @@ class UnitOfTemperature(StrEnum):
|
||||
class UnitOfTime(StrEnum):
|
||||
"""Time units."""
|
||||
|
||||
MICROSECONDS = "μs"
|
||||
MICROSECONDS = "µs"
|
||||
MILLISECONDS = "ms"
|
||||
SECONDS = "s"
|
||||
MINUTES = "min"
|
||||
@ -902,7 +902,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"
|
||||
|
@ -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")
|
||||
|
@ -709,7 +709,7 @@ async def test_chat_log_continue_conversation(
|
||||
chat_log.async_add_assistant_content_without_tools(
|
||||
AssistantContent(
|
||||
agent_id="mock-agent-id",
|
||||
content="Ποιο είναι το αγαπημένο σου χρώμα στα ελληνικά;",
|
||||
content="Ποιο είναι το αγαπηµένο σου χρώµα στα ελληνικά;",
|
||||
)
|
||||
)
|
||||
assert chat_log.continue_conversation is True
|
||||
|
@ -132,7 +132,7 @@
|
||||
'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]
|
||||
@ -140,7 +140,7 @@
|
||||
'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',
|
||||
@ -971,7 +971,7 @@
|
||||
'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]
|
||||
@ -979,7 +979,7 @@
|
||||
'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',
|
||||
|
@ -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:10.122Z',
|
||||
'unit': 'μg/m^3',
|
||||
'unit': 'µg/m^3',
|
||||
'value': None,
|
||||
}),
|
||||
}),
|
||||
@ -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,
|
||||
}),
|
||||
}),
|
||||
@ -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,
|
||||
}),
|
||||
}),
|
||||
@ -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,
|
||||
}),
|
||||
}),
|
||||
|
Loading…
x
Reference in New Issue
Block a user