From 60cab62da51f71a22847d62e1f1dc5a03b358d3a Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Tue, 28 Jul 2020 20:05:31 +0200 Subject: [PATCH] Revert "Make rfxtrx RfyDevices have sun automation switches (#38210)" This reverts commit ee0c32cbb7e64c8210627952a7e14d86e47e2b00. --- homeassistant/components/rfxtrx/const.py | 2 -- homeassistant/components/rfxtrx/switch.py | 1 - tests/components/rfxtrx/test_switch.py | 18 ------------------ 3 files changed, 21 deletions(-) diff --git a/homeassistant/components/rfxtrx/const.py b/homeassistant/components/rfxtrx/const.py index 500fb3a1d1b..7626c082f45 100644 --- a/homeassistant/components/rfxtrx/const.py +++ b/homeassistant/components/rfxtrx/const.py @@ -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" diff --git a/homeassistant/components/rfxtrx/switch.py b/homeassistant/components/rfxtrx/switch.py index 52a55f79c01..6cd9a484abd 100644 --- a/homeassistant/components/rfxtrx/switch.py +++ b/homeassistant/components/rfxtrx/switch.py @@ -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 diff --git a/tests/components/rfxtrx/test_switch.py b/tests/components/rfxtrx/test_switch.py index 1f43081a9b5..22f7a73c77c 100644 --- a/tests/components/rfxtrx/test_switch.py +++ b/tests/components/rfxtrx/test_switch.py @@ -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"