Hi,
I have been trying to create a app that opens a cover on workdays at a specific time, like 6:00, but I just got stuck with the time part, here is my code:
# Eltern_Cover_Offnen_Arbeitstag:
# module: open_cover_workdays
# class: Time_Cover_Workdays
# cover: "cover.eltern"
# ON_Time: "06:00:00"
from appdaemon.plugins.hass.hassapi import Hass
import datetime
import time
class Time_Cover_Workdays(Hass):
def initialize(self) -> None:
cover = self.args["cover"]
ON_Time = self.args["ON_Time"]
workday = self.entities.binary_sensor.workday_sensor.state
if workday == "on":
#if actual time == "ON_Time":
# self.call_service("cover/open_cover", entity_id = cover)
Been readind the docs here, but just don’t get how to write a function that will run the script at given rime.
Any help will be appreciated.