mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Use more _attrs_* in Axis entities (#85555)
* Use _attr_available * Use _attr_is_on * Use _attr_name * Make some values private * Update names of axis entity base classes * Fix review comments
This commit is contained in:
@@ -137,6 +137,19 @@ async def test_switches_with_port_management(hass, config_entry, mock_rtsp_event
|
||||
assert relay_0.state == STATE_OFF
|
||||
assert relay_0.name == f"{NAME} Doorbell"
|
||||
|
||||
# State update
|
||||
|
||||
mock_rtsp_event(
|
||||
topic="tns1:Device/Trigger/Relay",
|
||||
data_type="LogicalState",
|
||||
data_value="active",
|
||||
source_name="RelayToken",
|
||||
source_idx="0",
|
||||
)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
assert hass.states.get(f"{SWITCH_DOMAIN}.{NAME}_relay_1").state == STATE_ON
|
||||
|
||||
await hass.services.async_call(
|
||||
SWITCH_DOMAIN,
|
||||
SERVICE_TURN_ON,
|
||||
|
||||
Reference in New Issue
Block a user