mirror of
https://github.com/home-assistant/core.git
synced 2026-02-20 18:08:00 +00:00
Rename Matter Eve Thermostat Fixture to eve_thermo_v4 (#160796)
This commit is contained in:
@@ -96,7 +96,7 @@ async def integration_fixture(
|
||||
"eve_energy_20ecn4101",
|
||||
"eve_energy_plug",
|
||||
"eve_energy_plug_patched",
|
||||
"eve_thermo",
|
||||
"eve_thermo_v4",
|
||||
"eve_thermo_v5",
|
||||
"eve_shutter",
|
||||
"eve_weather_sensor",
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
"0/40/0": 17,
|
||||
"0/40/1": "Eve Systems",
|
||||
"0/40/2": 4874,
|
||||
"0/40/3": "Eve Thermo",
|
||||
"0/40/3": "Eve Thermo 20EBP1701",
|
||||
"0/40/4": 79,
|
||||
"0/40/5": "",
|
||||
"0/40/6": "**REDACTED**",
|
||||
@@ -391,7 +391,7 @@
|
||||
'state': 'off',
|
||||
})
|
||||
# ---
|
||||
# name: test_binary_sensors[eve_thermo][binary_sensor.eve_thermo_local_temperature_remote_sensing-entry]
|
||||
# name: test_binary_sensors[eve_thermo_v4][binary_sensor.eve_thermo_20ebp1701_local_temperature_remote_sensing-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@@ -404,7 +404,7 @@
|
||||
'disabled_by': None,
|
||||
'domain': 'binary_sensor',
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'binary_sensor.eve_thermo_local_temperature_remote_sensing',
|
||||
'entity_id': 'binary_sensor.eve_thermo_20ebp1701_local_temperature_remote_sensing',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
@@ -426,20 +426,20 @@
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_binary_sensors[eve_thermo][binary_sensor.eve_thermo_local_temperature_remote_sensing-state]
|
||||
# name: test_binary_sensors[eve_thermo_v4][binary_sensor.eve_thermo_20ebp1701_local_temperature_remote_sensing-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'Eve Thermo Local temperature remote sensing',
|
||||
'friendly_name': 'Eve Thermo 20EBP1701 Local temperature remote sensing',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'binary_sensor.eve_thermo_local_temperature_remote_sensing',
|
||||
'entity_id': 'binary_sensor.eve_thermo_20ebp1701_local_temperature_remote_sensing',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'off',
|
||||
})
|
||||
# ---
|
||||
# name: test_binary_sensors[eve_thermo][binary_sensor.eve_thermo_outdoor_temperature_remote_sensing-entry]
|
||||
# name: test_binary_sensors[eve_thermo_v4][binary_sensor.eve_thermo_20ebp1701_outdoor_temperature_remote_sensing-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@@ -452,7 +452,7 @@
|
||||
'disabled_by': None,
|
||||
'domain': 'binary_sensor',
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'binary_sensor.eve_thermo_outdoor_temperature_remote_sensing',
|
||||
'entity_id': 'binary_sensor.eve_thermo_20ebp1701_outdoor_temperature_remote_sensing',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
@@ -474,13 +474,13 @@
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_binary_sensors[eve_thermo][binary_sensor.eve_thermo_outdoor_temperature_remote_sensing-state]
|
||||
# name: test_binary_sensors[eve_thermo_v4][binary_sensor.eve_thermo_20ebp1701_outdoor_temperature_remote_sensing-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'Eve Thermo Outdoor temperature remote sensing',
|
||||
'friendly_name': 'Eve Thermo 20EBP1701 Outdoor temperature remote sensing',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'binary_sensor.eve_thermo_outdoor_temperature_remote_sensing',
|
||||
'entity_id': 'binary_sensor.eve_thermo_20ebp1701_outdoor_temperature_remote_sensing',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
|
||||
@@ -1418,7 +1418,7 @@
|
||||
'state': 'unknown',
|
||||
})
|
||||
# ---
|
||||
# name: test_buttons[eve_thermo][button.eve_thermo_identify-entry]
|
||||
# name: test_buttons[eve_thermo_v4][button.eve_thermo_20ebp1701_identify-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@@ -1431,7 +1431,7 @@
|
||||
'disabled_by': None,
|
||||
'domain': 'button',
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'button.eve_thermo_identify',
|
||||
'entity_id': 'button.eve_thermo_20ebp1701_identify',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
@@ -1453,14 +1453,14 @@
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_buttons[eve_thermo][button.eve_thermo_identify-state]
|
||||
# name: test_buttons[eve_thermo_v4][button.eve_thermo_20ebp1701_identify-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'identify',
|
||||
'friendly_name': 'Eve Thermo Identify',
|
||||
'friendly_name': 'Eve Thermo 20EBP1701 Identify',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'button.eve_thermo_identify',
|
||||
'entity_id': 'button.eve_thermo_20ebp1701_identify',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
'state': 'heat',
|
||||
})
|
||||
# ---
|
||||
# name: test_climates[eve_thermo][climate.eve_thermo-entry]
|
||||
# name: test_climates[eve_thermo_v4][climate.eve_thermo_20ebp1701-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@@ -211,7 +211,7 @@
|
||||
'disabled_by': None,
|
||||
'domain': 'climate',
|
||||
'entity_category': None,
|
||||
'entity_id': 'climate.eve_thermo',
|
||||
'entity_id': 'climate.eve_thermo_20ebp1701',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
@@ -233,11 +233,11 @@
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_climates[eve_thermo][climate.eve_thermo-state]
|
||||
# name: test_climates[eve_thermo_v4][climate.eve_thermo_20ebp1701-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'current_temperature': 21.0,
|
||||
'friendly_name': 'Eve Thermo',
|
||||
'friendly_name': 'Eve Thermo 20EBP1701',
|
||||
'hvac_modes': list([
|
||||
<HVACMode.OFF: 'off'>,
|
||||
<HVACMode.HEAT: 'heat'>,
|
||||
@@ -248,7 +248,7 @@
|
||||
'temperature': 17.0,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'climate.eve_thermo',
|
||||
'entity_id': 'climate.eve_thermo_20ebp1701',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
|
||||
@@ -1037,7 +1037,7 @@
|
||||
'state': '3',
|
||||
})
|
||||
# ---
|
||||
# name: test_numbers[eve_thermo][number.eve_thermo_temperature_offset-entry]
|
||||
# name: test_numbers[eve_thermo_v4][number.eve_thermo_20ebp1701_temperature_offset-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@@ -1055,7 +1055,7 @@
|
||||
'disabled_by': None,
|
||||
'domain': 'number',
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'number.eve_thermo_temperature_offset',
|
||||
'entity_id': 'number.eve_thermo_20ebp1701_temperature_offset',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
@@ -1077,11 +1077,11 @@
|
||||
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_numbers[eve_thermo][number.eve_thermo_temperature_offset-state]
|
||||
# name: test_numbers[eve_thermo_v4][number.eve_thermo_20ebp1701_temperature_offset-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'temperature',
|
||||
'friendly_name': 'Eve Thermo Temperature offset',
|
||||
'friendly_name': 'Eve Thermo 20EBP1701 Temperature offset',
|
||||
'max': 50,
|
||||
'min': -50,
|
||||
'mode': <NumberMode.BOX: 'box'>,
|
||||
@@ -1089,7 +1089,7 @@
|
||||
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'number.eve_thermo_temperature_offset',
|
||||
'entity_id': 'number.eve_thermo_20ebp1701_temperature_offset',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
|
||||
@@ -1400,7 +1400,7 @@
|
||||
'state': 'previous',
|
||||
})
|
||||
# ---
|
||||
# name: test_selects[eve_thermo][select.eve_thermo_temperature_display_mode-entry]
|
||||
# name: test_selects[eve_thermo_v4][select.eve_thermo_20ebp1701_temperature_display_mode-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@@ -1418,7 +1418,7 @@
|
||||
'disabled_by': None,
|
||||
'domain': 'select',
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'select.eve_thermo_temperature_display_mode',
|
||||
'entity_id': 'select.eve_thermo_20ebp1701_temperature_display_mode',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
@@ -1440,17 +1440,17 @@
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_selects[eve_thermo][select.eve_thermo_temperature_display_mode-state]
|
||||
# name: test_selects[eve_thermo_v4][select.eve_thermo_20ebp1701_temperature_display_mode-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'Eve Thermo Temperature display mode',
|
||||
'friendly_name': 'Eve Thermo 20EBP1701 Temperature display mode',
|
||||
'options': list([
|
||||
'Celsius',
|
||||
'Fahrenheit',
|
||||
]),
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'select.eve_thermo_temperature_display_mode',
|
||||
'entity_id': 'select.eve_thermo_20ebp1701_temperature_display_mode',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
|
||||
@@ -4904,7 +4904,7 @@
|
||||
'state': '100',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve_thermo][sensor.eve_thermo_battery-entry]
|
||||
# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_battery-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@@ -4919,7 +4919,7 @@
|
||||
'disabled_by': None,
|
||||
'domain': 'sensor',
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'sensor.eve_thermo_battery',
|
||||
'entity_id': 'sensor.eve_thermo_20ebp1701_battery',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
@@ -4941,23 +4941,23 @@
|
||||
'unit_of_measurement': '%',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve_thermo][sensor.eve_thermo_battery-state]
|
||||
# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_battery-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'battery',
|
||||
'friendly_name': 'Eve Thermo Battery',
|
||||
'friendly_name': 'Eve Thermo 20EBP1701 Battery',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': '%',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.eve_thermo_battery',
|
||||
'entity_id': 'sensor.eve_thermo_20ebp1701_battery',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '100',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve_thermo][sensor.eve_thermo_battery_voltage-entry]
|
||||
# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_battery_voltage-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@@ -4972,7 +4972,7 @@
|
||||
'disabled_by': None,
|
||||
'domain': 'sensor',
|
||||
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
|
||||
'entity_id': 'sensor.eve_thermo_battery_voltage',
|
||||
'entity_id': 'sensor.eve_thermo_20ebp1701_battery_voltage',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
@@ -5000,23 +5000,23 @@
|
||||
'unit_of_measurement': <UnitOfElectricPotential.VOLT: 'V'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve_thermo][sensor.eve_thermo_battery_voltage-state]
|
||||
# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_battery_voltage-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'voltage',
|
||||
'friendly_name': 'Eve Thermo Battery voltage',
|
||||
'friendly_name': 'Eve Thermo 20EBP1701 Battery voltage',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': <UnitOfElectricPotential.VOLT: 'V'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.eve_thermo_battery_voltage',
|
||||
'entity_id': 'sensor.eve_thermo_20ebp1701_battery_voltage',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '3.05',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve_thermo][sensor.eve_thermo_temperature-entry]
|
||||
# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_temperature-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@@ -5031,7 +5031,7 @@
|
||||
'disabled_by': None,
|
||||
'domain': 'sensor',
|
||||
'entity_category': None,
|
||||
'entity_id': 'sensor.eve_thermo_temperature',
|
||||
'entity_id': 'sensor.eve_thermo_20ebp1701_temperature',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
@@ -5056,23 +5056,23 @@
|
||||
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve_thermo][sensor.eve_thermo_temperature-state]
|
||||
# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_temperature-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'device_class': 'temperature',
|
||||
'friendly_name': 'Eve Thermo Temperature',
|
||||
'friendly_name': 'Eve Thermo 20EBP1701 Temperature',
|
||||
'state_class': <SensorStateClass.MEASUREMENT: 'measurement'>,
|
||||
'unit_of_measurement': <UnitOfTemperature.CELSIUS: '°C'>,
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.eve_thermo_temperature',
|
||||
'entity_id': 'sensor.eve_thermo_20ebp1701_temperature',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': '21.0',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve_thermo][sensor.eve_thermo_valve_position-entry]
|
||||
# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_valve_position-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@@ -5085,7 +5085,7 @@
|
||||
'disabled_by': None,
|
||||
'domain': 'sensor',
|
||||
'entity_category': None,
|
||||
'entity_id': 'sensor.eve_thermo_valve_position',
|
||||
'entity_id': 'sensor.eve_thermo_20ebp1701_valve_position',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
@@ -5107,14 +5107,14 @@
|
||||
'unit_of_measurement': '%',
|
||||
})
|
||||
# ---
|
||||
# name: test_sensors[eve_thermo][sensor.eve_thermo_valve_position-state]
|
||||
# name: test_sensors[eve_thermo_v4][sensor.eve_thermo_20ebp1701_valve_position-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'Eve Thermo Valve position',
|
||||
'friendly_name': 'Eve Thermo 20EBP1701 Valve position',
|
||||
'unit_of_measurement': '%',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'sensor.eve_thermo_valve_position',
|
||||
'entity_id': 'sensor.eve_thermo_20ebp1701_valve_position',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
|
||||
@@ -487,7 +487,7 @@
|
||||
'state': 'off',
|
||||
})
|
||||
# ---
|
||||
# name: test_switches[eve_thermo][switch.eve_thermo_child_lock-entry]
|
||||
# name: test_switches[eve_thermo_v4][switch.eve_thermo_20ebp1701_child_lock-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': set({
|
||||
}),
|
||||
@@ -500,7 +500,7 @@
|
||||
'disabled_by': None,
|
||||
'domain': 'switch',
|
||||
'entity_category': <EntityCategory.CONFIG: 'config'>,
|
||||
'entity_id': 'switch.eve_thermo_child_lock',
|
||||
'entity_id': 'switch.eve_thermo_20ebp1701_child_lock',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
@@ -522,13 +522,13 @@
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_switches[eve_thermo][switch.eve_thermo_child_lock-state]
|
||||
# name: test_switches[eve_thermo_v4][switch.eve_thermo_20ebp1701_child_lock-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
'friendly_name': 'Eve Thermo Child lock',
|
||||
'friendly_name': 'Eve Thermo 20EBP1701 Child lock',
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'switch.eve_thermo_child_lock',
|
||||
'entity_id': 'switch.eve_thermo_20ebp1701_child_lock',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
|
||||
@@ -201,7 +201,7 @@ async def test_battery_sensor_description(
|
||||
state = hass.states.get("sensor.smoke_sensor_battery_type") is None
|
||||
|
||||
|
||||
@pytest.mark.parametrize("node_fixture", ["eve_thermo"])
|
||||
@pytest.mark.parametrize("node_fixture", ["eve_thermo_v4"])
|
||||
async def test_eve_thermo_sensor(
|
||||
hass: HomeAssistant,
|
||||
matter_client: MagicMock,
|
||||
@@ -209,26 +209,26 @@ async def test_eve_thermo_sensor(
|
||||
) -> None:
|
||||
"""Test Eve Thermo."""
|
||||
# Valve position
|
||||
state = hass.states.get("sensor.eve_thermo_valve_position")
|
||||
state = hass.states.get("sensor.eve_thermo_20ebp1701_valve_position")
|
||||
assert state
|
||||
assert state.state == "10"
|
||||
|
||||
set_node_attribute(matter_node, 1, 319486977, 319422488, 0)
|
||||
await trigger_subscription_callback(hass, matter_client)
|
||||
|
||||
state = hass.states.get("sensor.eve_thermo_valve_position")
|
||||
state = hass.states.get("sensor.eve_thermo_20ebp1701_valve_position")
|
||||
assert state
|
||||
assert state.state == "0"
|
||||
|
||||
# LocalTemperature
|
||||
state = hass.states.get("sensor.eve_thermo_temperature")
|
||||
state = hass.states.get("sensor.eve_thermo_20ebp1701_temperature")
|
||||
assert state
|
||||
assert state.state == "21.0"
|
||||
|
||||
set_node_attribute(matter_node, 1, 513, 0, 1800)
|
||||
await trigger_subscription_callback(hass, matter_client)
|
||||
|
||||
state = hass.states.get("sensor.eve_thermo_temperature")
|
||||
state = hass.states.get("sensor.eve_thermo_20ebp1701_temperature")
|
||||
assert state
|
||||
assert state.state == "18.0"
|
||||
|
||||
|
||||
@@ -116,32 +116,32 @@ async def test_power_switch(hass: HomeAssistant, matter_node: MatterNode) -> Non
|
||||
assert state.attributes["friendly_name"] == "Room AirConditioner Power"
|
||||
|
||||
|
||||
@pytest.mark.parametrize("node_fixture", ["eve_thermo"])
|
||||
@pytest.mark.parametrize("node_fixture", ["eve_thermo_v4"])
|
||||
async def test_numeric_switch(
|
||||
hass: HomeAssistant,
|
||||
matter_client: MagicMock,
|
||||
matter_node: MatterNode,
|
||||
) -> None:
|
||||
"""Test numeric switch entity is discovered and working using an Eve Thermo fixture ."""
|
||||
state = hass.states.get("switch.eve_thermo_child_lock")
|
||||
state = hass.states.get("switch.eve_thermo_20ebp1701_child_lock")
|
||||
assert state
|
||||
assert state.state == "off"
|
||||
# name should be derived from description attribute
|
||||
assert state.attributes["friendly_name"] == "Eve Thermo Child lock"
|
||||
assert state.attributes["friendly_name"] == "Eve Thermo 20EBP1701 Child lock"
|
||||
# test attribute changes
|
||||
set_node_attribute(matter_node, 1, 516, 1, 1)
|
||||
await trigger_subscription_callback(hass, matter_client)
|
||||
state = hass.states.get("switch.eve_thermo_child_lock")
|
||||
state = hass.states.get("switch.eve_thermo_20ebp1701_child_lock")
|
||||
assert state.state == "on"
|
||||
set_node_attribute(matter_node, 1, 516, 1, 0)
|
||||
await trigger_subscription_callback(hass, matter_client)
|
||||
state = hass.states.get("switch.eve_thermo_child_lock")
|
||||
state = hass.states.get("switch.eve_thermo_20ebp1701_child_lock")
|
||||
assert state.state == "off"
|
||||
# test switch service
|
||||
await hass.services.async_call(
|
||||
"switch",
|
||||
"turn_on",
|
||||
{"entity_id": "switch.eve_thermo_child_lock"},
|
||||
{"entity_id": "switch.eve_thermo_20ebp1701_child_lock"},
|
||||
blocking=True,
|
||||
)
|
||||
assert matter_client.write_attribute.call_count == 1
|
||||
@@ -156,7 +156,7 @@ async def test_numeric_switch(
|
||||
await hass.services.async_call(
|
||||
"switch",
|
||||
"turn_off",
|
||||
{"entity_id": "switch.eve_thermo_child_lock"},
|
||||
{"entity_id": "switch.eve_thermo_20ebp1701_child_lock"},
|
||||
blocking=True,
|
||||
)
|
||||
assert matter_client.write_attribute.call_count == 2
|
||||
|
||||
Reference in New Issue
Block a user