Skip to content

Instantly share code, notes, and snippets.

View enyone's full-sized avatar

Juho Tykkälä enyone

View GitHub Profile
@enyone
enyone / MicMute.ps1
Created October 12, 2025 19:48
Windows microphone mute toggle scripts
$source = @"
[DllImport("user32.dll")] public static extern IntPtr GetForegroundWindow();
[DllImport("user32.dll")] public static extern IntPtr SendMessageW(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam);
private const int WM_APPCOMMAND=0x319;
private const int APPCOMMAND_MICROPHONE_VOLUME_MUTE=0x180000;
public static void MicMute(IntPtr h) {
SendMessageW(h, WM_APPCOMMAND, h, (IntPtr)APPCOMMAND_MICROPHONE_VOLUME_MUTE);
}
"@
"""$ cat config/quirks/lidltuyaeffects.py"""
"""Quirk for LIDL Melinera (Tuya) LED String Lights."""
import logging
from typing import Any, Union, Optional
import zigpy.types as t
from zigpy.profiles import zha
from zigpy.quirks import CustomCluster, CustomDevice
from zigpy.zcl import foundation
from zigpy.zcl.clusters.general import (