Revert "Make rfxtrx RfyDevices have sun automation switches (#38210)"
This reverts commit ee0c32cbb7
.
pull/38332/head
parent
612e27b5ff
commit
60cab62da5
|
@ -7,14 +7,12 @@ COMMAND_ON_LIST = [
|
|||
"Stop",
|
||||
"Open (inline relay)",
|
||||
"Stop (inline relay)",
|
||||
"Enable sun automation",
|
||||
]
|
||||
|
||||
COMMAND_OFF_LIST = [
|
||||
"Off",
|
||||
"Down",
|
||||
"Close (inline relay)",
|
||||
"Disable sun automation",
|
||||
]
|
||||
|
||||
ATTR_EVENT = "event"
|
||||
|
|
|
@ -37,7 +37,6 @@ async def async_setup_entry(
|
|||
isinstance(event.device, rfxtrxmod.LightingDevice)
|
||||
and not event.device.known_to_be_dimmable
|
||||
and not event.device.known_to_be_rollershutter
|
||||
or isinstance(event.device, rfxtrxmod.RfyDevice)
|
||||
)
|
||||
|
||||
# Add switch from config file
|
||||
|
|
|
@ -10,9 +10,6 @@ from . import _signal_event
|
|||
|
||||
from tests.common import mock_restore_cache
|
||||
|
||||
EVENT_RFY_ENABLE_SUN_AUTO = "081a00000301010113"
|
||||
EVENT_RFY_DISABLE_SUN_AUTO = "081a00000301010114"
|
||||
|
||||
|
||||
async def test_one_switch(hass, rfxtrx):
|
||||
"""Test with 1 switch."""
|
||||
|
@ -142,18 +139,3 @@ async def test_discover_switch(hass, rfxtrx):
|
|||
state = hass.states.get("switch.ac_118cdeb_2")
|
||||
assert state
|
||||
assert state.state == "on"
|
||||
|
||||
|
||||
async def test_discover_rfy_sun_switch(hass, rfxtrx_automatic):
|
||||
"""Test with discovery of switches."""
|
||||
rfxtrx = rfxtrx_automatic
|
||||
|
||||
await rfxtrx.signal(EVENT_RFY_DISABLE_SUN_AUTO)
|
||||
state = hass.states.get("switch.rfy_030101_1")
|
||||
assert state
|
||||
assert state.state == "off"
|
||||
|
||||
await rfxtrx.signal(EVENT_RFY_ENABLE_SUN_AUTO)
|
||||
state = hass.states.get("switch.rfy_030101_1")
|
||||
assert state
|
||||
assert state.state == "on"
|
||||
|
|
Loading…
Reference in New Issue