mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +00:00
Remove native_unit_of_measurement from Onewire counters (#132076)
This commit is contained in:
parent
3fb1b8e79a
commit
4fe8a43cc9
@ -233,7 +233,6 @@ DEVICE_SENSORS: dict[str, tuple[OneWireSensorEntityDescription, ...]] = {
|
|||||||
"1D": tuple(
|
"1D": tuple(
|
||||||
OneWireSensorEntityDescription(
|
OneWireSensorEntityDescription(
|
||||||
key=f"counter.{device_key}",
|
key=f"counter.{device_key}",
|
||||||
native_unit_of_measurement="count",
|
|
||||||
read_mode=READ_MODE_INT,
|
read_mode=READ_MODE_INT,
|
||||||
state_class=SensorStateClass.TOTAL_INCREASING,
|
state_class=SensorStateClass.TOTAL_INCREASING,
|
||||||
translation_key="counter_id",
|
translation_key="counter_id",
|
||||||
|
@ -363,7 +363,7 @@
|
|||||||
'supported_features': 0,
|
'supported_features': 0,
|
||||||
'translation_key': 'counter_id',
|
'translation_key': 'counter_id',
|
||||||
'unique_id': '/1D.111111111111/counter.A',
|
'unique_id': '/1D.111111111111/counter.A',
|
||||||
'unit_of_measurement': 'count',
|
'unit_of_measurement': None,
|
||||||
}),
|
}),
|
||||||
EntityRegistryEntrySnapshot({
|
EntityRegistryEntrySnapshot({
|
||||||
'aliases': set({
|
'aliases': set({
|
||||||
@ -396,7 +396,7 @@
|
|||||||
'supported_features': 0,
|
'supported_features': 0,
|
||||||
'translation_key': 'counter_id',
|
'translation_key': 'counter_id',
|
||||||
'unique_id': '/1D.111111111111/counter.B',
|
'unique_id': '/1D.111111111111/counter.B',
|
||||||
'unit_of_measurement': 'count',
|
'unit_of_measurement': None,
|
||||||
}),
|
}),
|
||||||
])
|
])
|
||||||
# ---
|
# ---
|
||||||
@ -408,7 +408,6 @@
|
|||||||
'friendly_name': '1D.111111111111 Counter A',
|
'friendly_name': '1D.111111111111 Counter A',
|
||||||
'raw_value': 251123.0,
|
'raw_value': 251123.0,
|
||||||
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
||||||
'unit_of_measurement': 'count',
|
|
||||||
}),
|
}),
|
||||||
'context': <ANY>,
|
'context': <ANY>,
|
||||||
'entity_id': 'sensor.1d_111111111111_counter_a',
|
'entity_id': 'sensor.1d_111111111111_counter_a',
|
||||||
@ -423,7 +422,6 @@
|
|||||||
'friendly_name': '1D.111111111111 Counter B',
|
'friendly_name': '1D.111111111111 Counter B',
|
||||||
'raw_value': 248125.0,
|
'raw_value': 248125.0,
|
||||||
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
||||||
'unit_of_measurement': 'count',
|
|
||||||
}),
|
}),
|
||||||
'context': <ANY>,
|
'context': <ANY>,
|
||||||
'entity_id': 'sensor.1d_111111111111_counter_b',
|
'entity_id': 'sensor.1d_111111111111_counter_b',
|
||||||
@ -531,7 +529,7 @@
|
|||||||
'supported_features': 0,
|
'supported_features': 0,
|
||||||
'translation_key': 'counter_id',
|
'translation_key': 'counter_id',
|
||||||
'unique_id': '/1D.111111111111/counter.A',
|
'unique_id': '/1D.111111111111/counter.A',
|
||||||
'unit_of_measurement': 'count',
|
'unit_of_measurement': None,
|
||||||
}),
|
}),
|
||||||
EntityRegistryEntrySnapshot({
|
EntityRegistryEntrySnapshot({
|
||||||
'aliases': set({
|
'aliases': set({
|
||||||
@ -564,7 +562,7 @@
|
|||||||
'supported_features': 0,
|
'supported_features': 0,
|
||||||
'translation_key': 'counter_id',
|
'translation_key': 'counter_id',
|
||||||
'unique_id': '/1D.111111111111/counter.B',
|
'unique_id': '/1D.111111111111/counter.B',
|
||||||
'unit_of_measurement': 'count',
|
'unit_of_measurement': None,
|
||||||
}),
|
}),
|
||||||
])
|
])
|
||||||
# ---
|
# ---
|
||||||
@ -576,7 +574,6 @@
|
|||||||
'friendly_name': '1D.111111111111 Counter A',
|
'friendly_name': '1D.111111111111 Counter A',
|
||||||
'raw_value': 251123.0,
|
'raw_value': 251123.0,
|
||||||
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
||||||
'unit_of_measurement': 'count',
|
|
||||||
}),
|
}),
|
||||||
'context': <ANY>,
|
'context': <ANY>,
|
||||||
'entity_id': 'sensor.1d_111111111111_counter_a',
|
'entity_id': 'sensor.1d_111111111111_counter_a',
|
||||||
@ -591,7 +588,6 @@
|
|||||||
'friendly_name': '1D.111111111111 Counter B',
|
'friendly_name': '1D.111111111111 Counter B',
|
||||||
'raw_value': 248125.0,
|
'raw_value': 248125.0,
|
||||||
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
|
||||||
'unit_of_measurement': 'count',
|
|
||||||
}),
|
}),
|
||||||
'context': <ANY>,
|
'context': <ANY>,
|
||||||
'entity_id': 'sensor.1d_111111111111_counter_b',
|
'entity_id': 'sensor.1d_111111111111_counter_b',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user