Set pH device class in Ondilo Ico (#116930)

This commit is contained in:
Joost Lekkerkerker 2024-05-06 19:09:02 +02:00 committed by GitHub
parent f3b08e89a5
commit 485f3b0f0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 11 deletions

View File

@ -4,9 +4,6 @@
"oxydo_reduction_potential": {
"default": "mdi:pool"
},
"ph": {
"default": "mdi:pool"
},
"tds": {
"default": "mdi:pool"
},

View File

@ -38,7 +38,7 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
),
SensorEntityDescription(
key="ph",
translation_key="ph",
device_class=SensorDeviceClass.PH,
state_class=SensorStateClass.MEASUREMENT,
),
SensorEntityDescription(

View File

@ -22,9 +22,6 @@
"oxydo_reduction_potential": {
"name": "Oxydo reduction potential"
},
"ph": {
"name": "pH"
},
"tds": {
"name": "TDS"
},

View File

@ -124,13 +124,13 @@
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_device_class': <SensorDeviceClass.PH: 'ph'>,
'original_icon': None,
'original_name': 'pH',
'platform': 'ondilo_ico',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'ph',
'translation_key': None,
'unique_id': 'W1122333044455-ph',
'unit_of_measurement': None,
})
@ -138,6 +138,7 @@
# name: test_sensors[sensor.pool_1_ph-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'ph',
'friendly_name': 'Pool 1 pH',
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
}),
@ -475,13 +476,13 @@
'name': None,
'options': dict({
}),
'original_device_class': None,
'original_device_class': <SensorDeviceClass.PH: 'ph'>,
'original_icon': None,
'original_name': 'pH',
'platform': 'ondilo_ico',
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'ph',
'translation_key': None,
'unique_id': 'W2233304445566-ph',
'unit_of_measurement': None,
})
@ -489,6 +490,7 @@
# name: test_sensors[sensor.pool_2_ph-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'ph',
'friendly_name': 'Pool 2 pH',
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
}),