Skip to content

Instantly share code, notes, and snippets.

View vidvisionify's full-sized avatar
I have no idea what I'm doing

Phil ⚡ vidvisionify

I have no idea what I'm doing
View GitHub Profile
@aptonic
aptonic / light.py
Last active October 12, 2021 03:32
Modifies homeassistant/components/flux_led/light.py to fix issue where LED lightstrip using MagicHome controller lights turn off immediately after turning them on. See https://community.home-assistant.io/t/flux-led-magiclight-dont-work-since-few-updated/145179/4
"""Support for Flux lights."""
import logging
import random
import socket
from flux_led import BulbScanner, WifiLedBulb
import voluptuous as vol
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
class DimImageElement extends Polymer.Element {
async setConfig(config) {
this.dim_entity = config.dim_entity;
this.img = document.createElement('hui-image-element')
this.img.setConfig(config);
this.appendChild(this.img)
}
set hass(hass) {
this.img.hass = hass;
@craigjmidwinter
craigjmidwinter / google_fit.py
Last active June 14, 2020 17:55
googlefit steps component for home assistant
import json
import logging
import os
import time
from datetime import datetime, timedelta
import httplib2
import requests
import voluptuous as vol
from apiclient.discovery import build
@mhungerford
mhungerford / app.js
Last active April 13, 2024 19:32
SparkFM for Pebble
var UI = require('ui');
//Replaced # with _, to support urlEncoding for POST
//Max RTTTL length is 512 (buffer on spark hard-coded).
var song_list = [
{song: "Back to the Future",
rtttl: "d=4,o=5,b=100:c_4,g_.4,8c_,b.4,16a_4,16g_4,8a_.4,8g_.4,8f_4,g_.4,16g_4,16g_4,2g_.4,c_,g_.,8c_6,b.,16a_,16g_,8a_.,8g_.,8f_,1g_,g_.,c_.,2g.,32g_.,32a_.,8g_,8f,8c_,g,32g_.,32a_.,8g_.,8d_.,8g_.,8d_.6,d_.6,d6,32c.6,32d.6,2d_.6,16d_,16g_,16d_,16g_,16c_6,16a_,16d_6,16g_6,c_.6,f_.,2c.6,32c_.6,32d_.6,8c_6,8a_,8f_,c6,32c_.6,32d_.6,8c_.6,8g_.,8c_.6,8g_.6,g_.6,g6,32f.6,32g.6,2g_.6"},
{song: "Barbie Girl",
rtttl: "d=4,o=5,b=125:8g_,8e,8g_,8c_6,a,p,8f_,8d_,8f_,8b,g_,8f_,8e,p,8e,8c_,f_,c_,p,8f_,8e,g_,f_,8g_,8e,8g_,8c_6,a,p,8f_,8d_,8f_,8b,g_,8f_,8e,p,8e,8c_,f_,c_,p,8f_,8e,g_,f_,8g_,8e,8g_,8c_6,a,p,8f_,8d_,8f_,8b,g_,8f_,8e,p,8e,8c_,f_,c_,p,8f_,8e,g_,f_"},
{song: "Butterfly",