Skip to content

Instantly share code, notes, and snippets.

View donbobka's full-sized avatar

Vladimir Lyzo donbobka

  • Australia, Melbourne
  • 18:47 (UTC +10:00)
View GitHub Profile
@donbobka
donbobka / TS0041.yaml
Created January 3, 2024 23:52 — forked from fr3nd/TS0041.yaml
Zigbee2MQTT - Tuya 1-button Scene Switch (TS0041)
blueprint:
name: Zigbee2MQTT - Tuya 1-Button Scene Switch
description: Automate your Tuya 1-Button Scene Switch via Zigbee2MQTT.
domain: automation
input:
switch:
name: Tuya 1-Button Scene Switch
description: Tuya 1-Button Scene Switch to use
selector:
entity:
@donbobka
donbobka / tuya-blinds.js
Last active October 27, 2023 00:51
Support battery and limits for ZM25RX-08/30
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const tuya = require('zigbee-herdsman-converters/lib/tuya');
const e = exposes.presets;
const ea = exposes.access;
const definitions = [
{
fingerprint: [
{modelID: 'TS0601', manufacturerName: '_TZE200_7eue9vhc'},
{modelID: 'TS0601', manufacturerName: '_TZE200_bv1jcqqu'},
dasdasd
FROM ruby:2.4.0
ENV APP_HOME /app
ENV HOME /root
RUN mkdir $APP_HOME
WORKDIR $APP_HOME
COPY Gemfile* $APP_HOME/
RUN bundle install
module InteractionExampleGroup
extend ActiveSupport::Concern
included do
let(:inputs) { {} }
let(:outcome) { described_class.run(inputs) }
let(:result) { outcome.result }
end
RSpec.configure do |config|
@donbobka
donbobka / registrations_controller.rb
Created September 23, 2012 15:54 — forked from jwo/registrations_controller.rb
API JSON authentication with Devise
class Api::RegistrationsController < Api::BaseController
respond_to :json
def create
user = User.new(params[:user])
if user.save
render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201
return
else