Skip to content

Instantly share code, notes, and snippets.

View 9zigen's full-sized avatar
🎯
Focusing

Alexey Volkov 9zigen

🎯
Focusing
View GitHub Profile
@9zigen
9zigen / alab-relay-board.js
Created November 25, 2023 21:42
inputs as switch
/* Custom converter for 4/8/12 channel zigbee switch */
const {
fromZigbeeConverters,
toZigbeeConverters,
exposes
} = require('zigbee-herdsman-converters');
const e = exposes.presets;
const ea = exposes.access;
const {deviceEndpoints, numeric, onOff, commandsOnOff, binary, quirkAddEndpointCluster} = require('zigbee-herdsman-converters/lib/modernExtend');
const definition = {
zigbeeModel: ['alab.switch'],
model: 'alab.switch',
vendor: 'Alab',
description: 'Four channel relay board with four inputs',
extend: [
deviceEndpoints({
endpoints: {"l1":1,"l2":2,"l3":3,"l4":4,"in1":5,"in2":6,"in3":7,"in4":8}}
"""Module to handle quirks of the Alap CO2 Sensor.
manufacturer specific attributes to control displaying and specific configuration.
"""
import logging
import zigpy.profiles.zha as zha_p
from zigpy.quirks import CustomCluster, CustomDevice
from zigpy.zcl.clusters.homeautomation import Diagnostic
from zhaquirks import Bus, LocalDataCluster, QuickInitDevice