Skip to content

Instantly share code, notes, and snippets.

@dlashua
dlashua / test.py
Created August 24, 2019 18:06
coros in AppDaemon
import appdaemon.plugins.hass.hassapi as hass
import asyncio
class Test(hass.Hass):
def terminate(self):
# clean up after ourselves
for f in self.futures:
f.cancel()
@dlashua
dlashua / alexaalarms.py
Last active September 2, 2019 13:27
alexaalarms.py
import appdaemon.plugins.hass.hassapi as hass
import datetime
import re
import pprint
from alexapy import AlexaLogin, AlexaAPI
BASE_DIR = "/conf/apps/"
ALEXA_DIR = BASE_DIR + "alexa_files/"
UPDATE_INTERVAL = 60 * 1
@dlashua
dlashua / notify_alexa.py
Created August 13, 2019 10:21
notify alexa
devices = [
{
"device_entity": "media_player.dance_echo",
"active_entity": "binary_sensor.dance_echo_notifications",
},
{
"device_entity": "media_player.celeste_echo",
"active_entity": "binary_sensor.celestebed_echo_notifications",
},
{
import appdaemon.plugins.hass.hassapi as hass
import datetime
# YAML CONFIG
# battery:
# module: battery
# class: Battery
# threshold: 35
# always_send: False
# th:
import appdaemon.plugins.hass.hassapi as hass
import voluptuous as vol
import time
## YAML CONFIG
# hvac_cool_switch:
# module: climateswitch
# class: ClimateSwitch
# climate: climate.hvac_cool
# switch: group.house_coolers