Skip to content

Instantly share code, notes, and snippets.

View benperiton's full-sized avatar

Ben Periton benperiton

  • UK
View GitHub Profile
@benperiton
benperiton / Hue_Dimmer_Multi_Press.yaml
Last active November 28, 2025 11:28
Hue Dimmer blueprint that supports multi-press
blueprint:
name: Easy Customizable Controller (Multi-Press) for Hue Dimmer Switch in Zigbee2MQTT
description: 'Controller automation for easy customizable buttons with Philips Hue
Dimmer Switch (Zigbee2MQTT).
Based on: https://gist.github.com/patpac9/2a378fa410d393501da6e35efb4277f7
IMPORTANT:
@benperiton
benperiton / HueDimmer.mjs
Last active November 24, 2025 14:25
External converter for zigbee2mqtt for Hue Dimmers to support multi-tap
import {Zcl} from "zigbee-herdsman";
import fz from "zigbee-herdsman-converters/converters/fromZigbee";
import * as exposes from "zigbee-herdsman-converters/lib/exposes";
import * as modernExtend from "zigbee-herdsman-converters/lib/modernExtend";
import * as reporting from "zigbee-herdsman-converters/lib/reporting";
const {presets, access} = exposes;
// Store press queues per device
const pressQueues = new Map();
@benperiton
benperiton / Dockerfile
Last active February 25, 2024 19:19
backgroundremover test
FROM python:3.6-slim
ARG UID
ARG GID
RUN groupadd -g "${GID}" app \
&& useradd --create-home --no-log-init -u "${UID}" -g "${GID}" app
RUN apt-get update && \
apt-get -y install python3-pip && \

$argon2id$v=19$m=64,t=512,p=2$tvIxJ39SkjB2s7yO0zxXPw$7b+cBjt2I9wjd6NTS1wW/A

@benperiton
benperiton / .lando.yml
Last active September 29, 2020 17:20
Getting HMR working with Lando and Laravel
proxy:
node:
- hmr.my-app.lndo.site:8080
services:
node:
type: node:12.16
ssl: true
scanner: false
build:

Keybase proof

I hereby claim:

  • I am benperiton on github.
  • I am benperiton (https://keybase.io/benperiton) on keybase.
  • I have a public key ASDfEAMNXoRgRwiBninrKc138_N4bVFcval0Mglo7DPIaQo

To claim this, I am signing this object:

@benperiton
benperiton / gist:3736194
Created September 17, 2012 08:34
ElReg
Consider this mockup in JS:
(function (global) {
function myThing ($opts) {
this.opts = $opts || {};
}
myThing.prototype.test = function () {
return this.opts;
};