mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
remove unwanted attribute in homee sensor tests (#147158)
This commit is contained in:
parent
0a5d13f104
commit
73bed96a0f
@ -81,27 +81,6 @@
|
|||||||
"data": "",
|
"data": "",
|
||||||
"name": ""
|
"name": ""
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"id": 34,
|
|
||||||
"node_id": 1,
|
|
||||||
"instance": 2,
|
|
||||||
"minimum": 0,
|
|
||||||
"maximum": 100,
|
|
||||||
"current_value": 100.0,
|
|
||||||
"target_value": 100.0,
|
|
||||||
"last_value": 100.0,
|
|
||||||
"unit": "%",
|
|
||||||
"step_value": 1.0,
|
|
||||||
"editable": 0,
|
|
||||||
"type": 8,
|
|
||||||
"state": 1,
|
|
||||||
"last_changed": 1709982926,
|
|
||||||
"changed_by": 1,
|
|
||||||
"changed_by_id": 0,
|
|
||||||
"based_on": 1,
|
|
||||||
"data": "",
|
|
||||||
"name": ""
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"id": 4,
|
"id": 4,
|
||||||
"node_id": 1,
|
"node_id": 1,
|
||||||
|
@ -52,59 +52,6 @@
|
|||||||
'state': '100.0',
|
'state': '100.0',
|
||||||
})
|
})
|
||||||
# ---
|
# ---
|
||||||
# name: test_sensor_snapshot[sensor.test_multisensor_battery_2-entry]
|
|
||||||
EntityRegistryEntrySnapshot({
|
|
||||||
'aliases': set({
|
|
||||||
}),
|
|
||||||
'area_id': None,
|
|
||||||
'capabilities': dict({
|
|
||||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
|
||||||
}),
|
|
||||||
'config_entry_id': <ANY>,
|
|
||||||
'config_subentry_id': <ANY>,
|
|
||||||
'device_class': None,
|
|
||||||
'device_id': <ANY>,
|
|
||||||
'disabled_by': None,
|
|
||||||
'domain': 'sensor',
|
|
||||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
|
||||||
'entity_id': 'sensor.test_multisensor_battery_2',
|
|
||||||
'has_entity_name': True,
|
|
||||||
'hidden_by': None,
|
|
||||||
'icon': None,
|
|
||||||
'id': <ANY>,
|
|
||||||
'labels': set({
|
|
||||||
}),
|
|
||||||
'name': None,
|
|
||||||
'options': dict({
|
|
||||||
}),
|
|
||||||
'original_device_class': <SensorDeviceClass.BATTERY: 'battery'>,
|
|
||||||
'original_icon': None,
|
|
||||||
'original_name': 'Battery',
|
|
||||||
'platform': 'homee',
|
|
||||||
'previous_unique_id': None,
|
|
||||||
'suggested_object_id': None,
|
|
||||||
'supported_features': 0,
|
|
||||||
'translation_key': 'battery_instance',
|
|
||||||
'unique_id': '00055511EECC-1-34',
|
|
||||||
'unit_of_measurement': '%',
|
|
||||||
})
|
|
||||||
# ---
|
|
||||||
# name: test_sensor_snapshot[sensor.test_multisensor_battery_2-state]
|
|
||||||
StateSnapshot({
|
|
||||||
'attributes': ReadOnlyDict({
|
|
||||||
'device_class': 'battery',
|
|
||||||
'friendly_name': 'Test MultiSensor Battery',
|
|
||||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
|
||||||
'unit_of_measurement': '%',
|
|
||||||
}),
|
|
||||||
'context': <ANY>,
|
|
||||||
'entity_id': 'sensor.test_multisensor_battery_2',
|
|
||||||
'last_changed': <ANY>,
|
|
||||||
'last_reported': <ANY>,
|
|
||||||
'last_updated': <ANY>,
|
|
||||||
'state': '100.0',
|
|
||||||
})
|
|
||||||
# ---
|
|
||||||
# name: test_sensor_snapshot[sensor.test_multisensor_current_1-entry]
|
# name: test_sensor_snapshot[sensor.test_multisensor_current_1-entry]
|
||||||
EntityRegistryEntrySnapshot({
|
EntityRegistryEntrySnapshot({
|
||||||
'aliases': set({
|
'aliases': set({
|
||||||
@ -490,6 +437,62 @@
|
|||||||
'state': '2000.0',
|
'state': '2000.0',
|
||||||
})
|
})
|
||||||
# ---
|
# ---
|
||||||
|
# name: test_sensor_snapshot[sensor.test_multisensor_external_temperature-entry]
|
||||||
|
EntityRegistryEntrySnapshot({
|
||||||
|
'aliases': set({
|
||||||
|
}),
|
||||||
|
'area_id': None,
|
||||||
|
'capabilities': dict({
|
||||||
|
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||||
|
}),
|
||||||
|
'config_entry_id': <ANY>,
|
||||||
|
'config_subentry_id': <ANY>,
|
||||||
|
'device_class': None,
|
||||||
|
'device_id': <ANY>,
|
||||||
|
'disabled_by': None,
|
||||||
|
'domain': 'sensor',
|
||||||
|
'entity_category': None,
|
||||||
|
'entity_id': 'sensor.test_multisensor_external_temperature',
|
||||||
|
'has_entity_name': True,
|
||||||
|
'hidden_by': None,
|
||||||
|
'icon': None,
|
||||||
|
'id': <ANY>,
|
||||||
|
'labels': set({
|
||||||
|
}),
|
||||||
|
'name': None,
|
||||||
|
'options': dict({
|
||||||
|
'sensor': dict({
|
||||||
|
'suggested_display_precision': 1,
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
'original_device_class': <SensorDeviceClass.TEMPERATURE: 'temperature'>,
|
||||||
|
'original_icon': None,
|
||||||
|
'original_name': 'External temperature',
|
||||||
|
'platform': 'homee',
|
||||||
|
'previous_unique_id': None,
|
||||||
|
'suggested_object_id': None,
|
||||||
|
'supported_features': 0,
|
||||||
|
'translation_key': 'external_temperature',
|
||||||
|
'unique_id': '00055511EECC-1-34',
|
||||||
|
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
||||||
|
})
|
||||||
|
# ---
|
||||||
|
# name: test_sensor_snapshot[sensor.test_multisensor_external_temperature-state]
|
||||||
|
StateSnapshot({
|
||||||
|
'attributes': ReadOnlyDict({
|
||||||
|
'device_class': 'temperature',
|
||||||
|
'friendly_name': 'Test MultiSensor External temperature',
|
||||||
|
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||||
|
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
||||||
|
}),
|
||||||
|
'context': <ANY>,
|
||||||
|
'entity_id': 'sensor.test_multisensor_external_temperature',
|
||||||
|
'last_changed': <ANY>,
|
||||||
|
'last_reported': <ANY>,
|
||||||
|
'last_updated': <ANY>,
|
||||||
|
'state': '23.6',
|
||||||
|
})
|
||||||
|
# ---
|
||||||
# name: test_sensor_snapshot[sensor.test_multisensor_floor_temperature-entry]
|
# name: test_sensor_snapshot[sensor.test_multisensor_floor_temperature-entry]
|
||||||
EntityRegistryEntrySnapshot({
|
EntityRegistryEntrySnapshot({
|
||||||
'aliases': set({
|
'aliases': set({
|
||||||
|
@ -47,7 +47,7 @@ async def test_up_down_values(
|
|||||||
|
|
||||||
assert hass.states.get("sensor.test_multisensor_state").state == OPEN_CLOSE_MAP[0]
|
assert hass.states.get("sensor.test_multisensor_state").state == OPEN_CLOSE_MAP[0]
|
||||||
|
|
||||||
attribute = mock_homee.nodes[0].attributes[28]
|
attribute = mock_homee.nodes[0].attributes[27]
|
||||||
for i in range(1, 5):
|
for i in range(1, 5):
|
||||||
await async_update_attribute_value(hass, attribute, i)
|
await async_update_attribute_value(hass, attribute, i)
|
||||||
assert (
|
assert (
|
||||||
@ -77,7 +77,7 @@ async def test_window_position(
|
|||||||
== WINDOW_MAP[0]
|
== WINDOW_MAP[0]
|
||||||
)
|
)
|
||||||
|
|
||||||
attribute = mock_homee.nodes[0].attributes[33]
|
attribute = mock_homee.nodes[0].attributes[32]
|
||||||
for i in range(1, 3):
|
for i in range(1, 3):
|
||||||
await async_update_attribute_value(hass, attribute, i)
|
await async_update_attribute_value(hass, attribute, i)
|
||||||
assert (
|
assert (
|
||||||
|
Loading…
x
Reference in New Issue
Block a user