This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import appdaemon.plugins.hass.hassapi as hass | |
import datetime | |
# YAML CONFIG | |
# battery: | |
# module: battery | |
# class: Battery | |
# threshold: 35 | |
# always_send: False | |
# th: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | |
}, | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import adbase as ad | |
import re | |
class AppReloader(ad.ADBase): | |
def initialize(self): | |
self.adbase = self.get_ad_api() | |
self.adbase.listen_event( | |
self.announce_dependency_event_cb, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import appdaemon.plugins.hass.hassapi as hass | |
import asyncio | |
class TestAllAsync(hass.Hass): | |
async def terminate(self): | |
self.log('i will die in 3 seconds') | |
await asyncio.sleep(3) | |
self.log('i am dead') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import appdaemon.plugins.hass.hassapi as hass | |
import base | |
class MyApp(hass.Hass): | |
def initialize(self): | |
self.depends_on_module(base) | |
base.App(self) | |
res = self.something() | |
self.log(res) # logs "thing" from base.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class app(hass.Hass): | |
def initialize(self): | |
helper = self.get_app('helper') | |
helper.add_dependent(self.name) | |
self.log(helper.do_a_thing()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gm_dlashua_statewatcher as statewatcher | |
import appdaemon.plugins.hass.hassapi as hass | |
AllState = statewatcher.AllState | |
class App(hass.Hass): | |
def initalize(self): | |
self.register_dependency(statewatcher) |
OlderNewer