Fix volatile_organic_compounds_parts translation string to be referenced for MQTT subentries device class selector (#141618)

* Fix ` volatile_organic_compounds_parts` translation string to be referenced for MQTT subentries device class selector

* Fix tests
This commit is contained in:
Jan Bouwhuis 2025-03-28 08:48:23 +01:00 committed by GitHub
parent 665541409a
commit 8887c979b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 16 additions and 16 deletions

View File

@ -453,7 +453,7 @@
"temperature": "[%key:component::sensor::entity_component::temperature::name%]",
"timestamp": "[%key:component::sensor::entity_component::timestamp::name%]",
"volatile_organic_compounds": "[%key:component::sensor::entity_component::volatile_organic_compounds::name%]",
"volatile_organic_compounds_parts": "[%key:component::sensor::entity_component::volatile_organic_compounds::name%]",
"volatile_organic_compounds_parts": "[%key:component::sensor::entity_component::volatile_organic_compounds_parts::name%]",
"voltage": "[%key:component::sensor::entity_component::voltage::name%]",
"volume": "[%key:component::sensor::entity_component::volume::name%]",
"volume_flow_rate": "[%key:component::sensor::entity_component::volume_flow_rate::name%]",

View File

@ -278,10 +278,10 @@
"name": "Timestamp"
},
"volatile_organic_compounds": {
"name": "VOCs"
"name": "Volatile organic compounds"
},
"volatile_organic_compounds_parts": {
"name": "[%key:component::sensor::entity_component::volatile_organic_compounds::name%]"
"name": "Volatile organic compounds parts"
},
"voltage": {
"name": "Voltage"

View File

@ -127,7 +127,7 @@ async def test_awair_gen1_sensors(
assert_expected_properties(
hass,
entity_registry,
"sensor.living_room_vocs",
"sensor.living_room_volatile_organic_compounds_parts",
f"{AWAIR_UUID}_{SENSOR_TYPES_MAP[API_VOC].unique_id_tag}",
"366",
{

View File

@ -686,7 +686,7 @@
'state': '20.0',
})
# ---
# name: test_sensors[air_purifier][sensor.air_purifier_vocs-entry]
# name: test_sensors[air_purifier][sensor.air_purifier_volatile_organic_compounds_parts-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
@ -701,7 +701,7 @@
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.air_purifier_vocs',
'entity_id': 'sensor.air_purifier_volatile_organic_compounds_parts',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
@ -713,7 +713,7 @@
}),
'original_device_class': <SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS_PARTS: 'volatile_organic_compounds_parts'>,
'original_icon': None,
'original_name': 'VOCs',
'original_name': 'Volatile organic compounds parts',
'platform': 'matter',
'previous_unique_id': None,
'supported_features': 0,
@ -722,16 +722,16 @@
'unit_of_measurement': 'ppm',
})
# ---
# name: test_sensors[air_purifier][sensor.air_purifier_vocs-state]
# name: test_sensors[air_purifier][sensor.air_purifier_volatile_organic_compounds_parts-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'volatile_organic_compounds_parts',
'friendly_name': 'Air Purifier VOCs',
'friendly_name': 'Air Purifier Volatile organic compounds parts',
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
'unit_of_measurement': 'ppm',
}),
'context': <ANY>,
'entity_id': 'sensor.air_purifier_vocs',
'entity_id': 'sensor.air_purifier_volatile_organic_compounds_parts',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
@ -1167,7 +1167,7 @@
'state': '20.08',
})
# ---
# name: test_sensors[air_quality_sensor][sensor.lightfi_aq1_air_quality_sensor_vocs-entry]
# name: test_sensors[air_quality_sensor][sensor.lightfi_aq1_air_quality_sensor_volatile_organic_compounds_parts-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
@ -1182,7 +1182,7 @@
'disabled_by': None,
'domain': 'sensor',
'entity_category': None,
'entity_id': 'sensor.lightfi_aq1_air_quality_sensor_vocs',
'entity_id': 'sensor.lightfi_aq1_air_quality_sensor_volatile_organic_compounds_parts',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
@ -1194,7 +1194,7 @@
}),
'original_device_class': <SensorDeviceClass.VOLATILE_ORGANIC_COMPOUNDS_PARTS: 'volatile_organic_compounds_parts'>,
'original_icon': None,
'original_name': 'VOCs',
'original_name': 'Volatile organic compounds parts',
'platform': 'matter',
'previous_unique_id': None,
'supported_features': 0,
@ -1203,16 +1203,16 @@
'unit_of_measurement': 'ppm',
})
# ---
# name: test_sensors[air_quality_sensor][sensor.lightfi_aq1_air_quality_sensor_vocs-state]
# name: test_sensors[air_quality_sensor][sensor.lightfi_aq1_air_quality_sensor_volatile_organic_compounds_parts-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'volatile_organic_compounds_parts',
'friendly_name': 'lightfi-aq1-air-quality-sensor VOCs',
'friendly_name': 'lightfi-aq1-air-quality-sensor Volatile organic compounds parts',
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
'unit_of_measurement': 'ppm',
}),
'context': <ANY>,
'entity_id': 'sensor.lightfi_aq1_air_quality_sensor_vocs',
'entity_id': 'sensor.lightfi_aq1_air_quality_sensor_volatile_organic_compounds_parts',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,