Add entity translations to Bluemaestro (#102424)
* Add entity translations to Bluemaestro * Fix * yes
This commit is contained in:
parent
5630b3611d
commit
32d62e477a
3 changed files with 14 additions and 9 deletions
|
@ -75,6 +75,7 @@ SENSOR_DESCRIPTIONS = {
|
||||||
): SensorEntityDescription(
|
): SensorEntityDescription(
|
||||||
key=f"{BlueMaestroSensorDeviceClass.DEW_POINT}_{Units.TEMP_CELSIUS}",
|
key=f"{BlueMaestroSensorDeviceClass.DEW_POINT}_{Units.TEMP_CELSIUS}",
|
||||||
device_class=SensorDeviceClass.TEMPERATURE,
|
device_class=SensorDeviceClass.TEMPERATURE,
|
||||||
|
translation_key="dew_point",
|
||||||
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
native_unit_of_measurement=UnitOfTemperature.CELSIUS,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
),
|
),
|
||||||
|
@ -110,10 +111,7 @@ def sensor_update_to_bluetooth_data_update(
|
||||||
device_key_to_bluetooth_entity_key(device_key): sensor_values.native_value
|
device_key_to_bluetooth_entity_key(device_key): sensor_values.native_value
|
||||||
for device_key, sensor_values in sensor_update.entity_values.items()
|
for device_key, sensor_values in sensor_update.entity_values.items()
|
||||||
},
|
},
|
||||||
entity_names={
|
entity_names={},
|
||||||
device_key_to_bluetooth_entity_key(device_key): sensor_values.name
|
|
||||||
for device_key, sensor_values in sensor_update.entity_values.items()
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -18,5 +18,12 @@
|
||||||
"already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]",
|
"already_in_progress": "[%key:common::config_flow::abort::already_in_progress%]",
|
||||||
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
|
"already_configured": "[%key:common::config_flow::abort::already_configured_device%]"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"entity": {
|
||||||
|
"sensor": {
|
||||||
|
"dew_point": {
|
||||||
|
"name": "Dew point"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,11 +76,11 @@
|
||||||
}),
|
}),
|
||||||
'original_device_class': <SensorDeviceClass.TEMPERATURE: 'temperature'>,
|
'original_device_class': <SensorDeviceClass.TEMPERATURE: 'temperature'>,
|
||||||
'original_icon': None,
|
'original_icon': None,
|
||||||
'original_name': 'Dew Point',
|
'original_name': 'Dew point',
|
||||||
'platform': 'bluemaestro',
|
'platform': 'bluemaestro',
|
||||||
'previous_unique_id': None,
|
'previous_unique_id': None,
|
||||||
'supported_features': 0,
|
'supported_features': 0,
|
||||||
'translation_key': None,
|
'translation_key': 'dew_point',
|
||||||
'unique_id': 'aa:bb:cc:dd:ee:ff-dew_point',
|
'unique_id': 'aa:bb:cc:dd:ee:ff-dew_point',
|
||||||
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
||||||
})
|
})
|
||||||
|
@ -89,7 +89,7 @@
|
||||||
StateSnapshot({
|
StateSnapshot({
|
||||||
'attributes': ReadOnlyDict({
|
'attributes': ReadOnlyDict({
|
||||||
'device_class': 'temperature',
|
'device_class': 'temperature',
|
||||||
'friendly_name': 'Tempo Disc THD EEFF Dew Point',
|
'friendly_name': 'Tempo Disc THD EEFF Dew point',
|
||||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||||
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
||||||
}),
|
}),
|
||||||
|
@ -178,7 +178,7 @@
|
||||||
}),
|
}),
|
||||||
'original_device_class': <SensorDeviceClass.SIGNAL_STRENGTH: 'signal_strength'>,
|
'original_device_class': <SensorDeviceClass.SIGNAL_STRENGTH: 'signal_strength'>,
|
||||||
'original_icon': None,
|
'original_icon': None,
|
||||||
'original_name': 'Signal Strength',
|
'original_name': 'Signal strength',
|
||||||
'platform': 'bluemaestro',
|
'platform': 'bluemaestro',
|
||||||
'previous_unique_id': None,
|
'previous_unique_id': None,
|
||||||
'supported_features': 0,
|
'supported_features': 0,
|
||||||
|
@ -191,7 +191,7 @@
|
||||||
StateSnapshot({
|
StateSnapshot({
|
||||||
'attributes': ReadOnlyDict({
|
'attributes': ReadOnlyDict({
|
||||||
'device_class': 'signal_strength',
|
'device_class': 'signal_strength',
|
||||||
'friendly_name': 'Tempo Disc THD EEFF Signal Strength',
|
'friendly_name': 'Tempo Disc THD EEFF Signal strength',
|
||||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||||
'unit_of_measurement': 'dBm',
|
'unit_of_measurement': 'dBm',
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Add table
Reference in a new issue