Created
January 8, 2020 08:30
-
-
Save jacobtomlinson/1eeb098280133a28e77113a7ca04cad7 to your computer and use it in GitHub Desktop.
Opsdroid Home Assistant sun lights
This file contains hidden or 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
from opsdroid_homeassistant import HassSkill, match_sunrise, match_sunset | |
class SunriseSkill(HassSkill): | |
@match_sunset | |
async def lights_on_at_sunset(self, event): | |
await self.turn_on("light.outside") | |
@match_sunrise | |
async def lights_off_at_sunrise(self, event): | |
await self.turn_off("light.outside") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment