mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
Merge pull request #3809 from Rubyan/patch-2
Fixed the sunrise / sunset example code in the documentation
This commit is contained in:
commit
a58d2a88a1
@ -40,8 +40,8 @@ import appdaemon.appapi as appapi
|
|||||||
class OutsideLights(appapi.AppDaemon):
|
class OutsideLights(appapi.AppDaemon):
|
||||||
|
|
||||||
def initialize(self):
|
def initialize(self):
|
||||||
self.run_at_sunrise(self.sunrise_cb, 0)
|
self.run_at_sunrise(self.sunrise_cb)
|
||||||
self.run_at_sunset(self.sunset_cb, 0)
|
self.run_at_sunset(self.sunset_cb)
|
||||||
|
|
||||||
def sunrise_cb(self, kwargs):
|
def sunrise_cb(self, kwargs):
|
||||||
self.turn_on(self.args["off_scene"])
|
self.turn_on(self.args["off_scene"])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user