Sfoglia il codice sorgente

Fix configuration for switches.

Switch was allowed to be added as a device, but I could not select the switch device type.

Fix namespace of kogan switch.
Jason Rumney 5 anni fa
parent
commit
58595e2ee8

+ 2 - 0
custom_components/tuya_local/configuration.py

@@ -35,6 +35,7 @@ INDIVIDUAL_CONFIG_SCHEMA_TEMPLATE = [
                 CONF_TYPE_GECO_HEATER,
                 CONF_TYPE_GPCV_HEATER,
                 CONF_TYPE_KOGAN_HEATER,
+                CONF_TYPE_KOGAN_SWITCH,
             ]
         ),
         "required": False,
@@ -68,6 +69,7 @@ INDIVIDUAL_CONFIG_SCHEMA_TEMPLATE = [
         "required": False,
         "default": False,
         "option": True,
+    },
 ]
 
 

+ 1 - 1
custom_components/tuya_local/switch.py

@@ -9,7 +9,7 @@ from .const import (
     CONF_TYPE_AUTO,
     CONF_SWITCH,
 )
-from .kogan_switch.switch import KoganSocketSwitch
+from .kogan_socket.switch import KoganSocketSwitch
 
 
 async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):