## Device Information
- **Brand:** NovaDigital
- **Model:** TS0601 4-gang wall s…witch
- **Manufacturer IDs:** `_TZE204_wskr3up8` and `_TZE284_8jqvnitg`
- **Device Type:** TS0601
## Issue Description
These NovaDigital 4-gang switches pair successfully with ZHA but only show diagnostic entities (LQI/RSSI). No switch entities are created, making the device non-functional.
## Working Solution
I've created a working custom quirk using TuyaQuirkBuilder that successfully exposes all 4 switches as individual entities. The quirk works for both manufacturer IDs mentioned above.
""Quirk customizado para NovaDigital TS0601 6-gang (4 switches + 2 tomadas).""
from zigpy.quirks.v2 import EntityType
import zigpy.types as t
from zhaquirks.tuya.builder import TuyaQuirkBuilder
class PowerOnBehavior(t.enum8):
""Enum para comportamento após queda de energia.""
Desligado = 0x00 # Sempre desligado
Ligado = 0x01 # Sempre ligado
Ultimo_Estado = 0x02 # Restaura estado anterior
class IndicatorMode(t.enum8):
""Enum para modo do LED indicador.""
Desligado = 0x00 # LED sempre desligado
Sincronizado = 0x01 # LED sincronizado com switch
Invertido = 0x02 # LED invertido (para encontrar no escuro)
# Quirk para NovaDigital TS0601 6-gang - Modelo _TZE284_8jqvnitg
(
TuyaQuirkBuilder("_TZE284_8jqvnitg", "TS0601")
# Switches principais (DPs 1-4)
.tuya_switch(
dp_id=1,
attribute_name="on_off_1",
entity_type=EntityType.STANDARD,
translation_key="switch_1",
fallback_name="Interruptor 1",
)
.tuya_switch(
dp_id=2,
attribute_name="on_off_2",
entity_type=EntityType.STANDARD,
translation_key="switch_2",
fallback_name="Interruptor 2",
)
.tuya_switch(
dp_id=3,
attribute_name="on_off_3",
entity_type=EntityType.STANDARD,
translation_key="switch_3",
fallback_name="Interruptor 3",
)
.tuya_switch(
dp_id=4,
attribute_name="on_off_4",
entity_type=EntityType.STANDARD,
translation_key="switch_4",
fallback_name="Interruptor 4",
)
# Tomadas (DPs 5-6)
.tuya_switch(
dp_id=5,
attribute_name="socket_1",
entity_type=EntityType.STANDARD,
translation_key="socket_1",
fallback_name="Tomada 1",
)
.tuya_switch(
dp_id=6,
attribute_name="socket_2",
entity_type=EntityType.STANDARD,
translation_key="socket_2",
fallback_name="Tomada 2",
)
# Modo ao Ligar Global (DP 14)
.tuya_enum(
dp_id=14,
attribute_name="power_on_behavior",
enum_class=PowerOnBehavior,
entity_type=EntityType.CONFIG,
translation_key="power_on_behavior",
fallback_name="Modo ao Ligar",
)
# Modo do LED Indicador (DP 15)
.tuya_enum(
dp_id=15,
attribute_name="indicator_mode",
enum_class=IndicatorMode,
entity_type=EntityType.CONFIG,
translation_key="indicator_mode",
fallback_name="Modo do LED Indicador",
)
.skip_configuration()
.add_to_registry()
)
# Quirk para modelo alternativo _TZE204_wskr3up8
(
TuyaQuirkBuilder("_TZE204_wskr3up8", "TS0601")
# Switches principais (DPs 1-4)
.tuya_switch(
dp_id=1,
attribute_name="on_off_1",
entity_type=EntityType.STANDARD,
translation_key="switch_1",
fallback_name="Interruptor 1",
)
.tuya_switch(
dp_id=2,
attribute_name="on_off_2",
entity_type=EntityType.STANDARD,
translation_key="switch_2",
fallback_name="Interruptor 2",
)
.tuya_switch(
dp_id=3,
attribute_name="on_off_3",
entity_type=EntityType.STANDARD,
translation_key="switch_3",
fallback_name="Interruptor 3",
)
.tuya_switch(
dp_id=4,
attribute_name="on_off_4",
entity_type=EntityType.STANDARD,
translation_key="switch_4",
fallback_name="Interruptor 4",
)
# Tomadas (DPs 5-6)
.tuya_switch(
dp_id=5,
attribute_name="socket_1",
entity_type=EntityType.STANDARD,
translation_key="socket_1",
fallback_name="Tomada 1",
)
.tuya_switch(
dp_id=6,
attribute_name="socket_2",
entity_type=EntityType.STANDARD,
translation_key="socket_2",
fallback_name="Tomada 2",
)
# Modo ao Ligar Global (DP 14)
.tuya_enum(
dp_id=14,
attribute_name="power_on_behavior",
enum_class=PowerOnBehavior,
entity_type=EntityType.CONFIG,
translation_key="power_on_behavior",
fallback_name="Modo ao Ligar",
)
# Modo do LED Indicador (DP 15)
.tuya_enum(
dp_id=15,
attribute_name="indicator_mode",
enum_class=IndicatorMode,
entity_type=EntityType.CONFIG,
translation_key="indicator_mode",
fallback_name="Modo do LED Indicador",
)
.skip_configuration()
.add_to_registry()
)
Testing Results:
- All 4 switches work independently
- Proper entity names and icons
- Full integration with Home Assistant automations
- Tested on both manufacturer IDs successfully