Skip to content

Instantly share code, notes, and snippets.

import appdaemon.plugins.hass.hassapi as hass
import numpy as np
from numpy.polynomial import Polynomial as Poly
import math
from threading import Lock
DEFAULT_TRANSITION = 1
DEFAULT_START_BRIGHTNESS = 0
DEFAULT_FINISH_BRIGHTNESS = 255
@AlexLadd
AlexLadd / transitional_lighting.py
Created November 19, 2019 23:56
Appdaemon Transitional Lighting
import appdaemon.plugins.hass.hassapi as hass
import numpy as np
import math
DEFAULT_TRANSITION = 1
DEFAULT_TOTAL_TIME = 900
DEFAULT_TIME_STEP = 10
RGB_SEQUENCE = [
[255, 0, 0],
[255, 0, 0],
import requests
from bs4 import BeautifulSoup
import json
def get_spotify_token(username, password):
"""spotify_token
Retrieves a web player access_token from Spotify
Written by Alex Ladd http://github.com/AlexLadd