Run_minutely app not executing

Hi Everybody,

I’m relatively new to AppDaemon but I already started loving it.

I’ve tried to create an app, which should run every minute and check the time and day of week. The app should then change an input select in home assistant.

My log shows only that the app is initializing and then nothing happens.

the app called “state_of_day.py” looks like this:

import appdaemon.plugins.hass.hassapi as hass
import datetime
                                                                                                                                                                                 
###############################################################################
# App to set the state of home based on time of day and day of week
# args:
#
# morning_time: time of day when "morning" starts, e.g. 06:00:00
# day_time: time of day when "day" starts, e.g. 10:00:00
# night_time: time of day when "night" starts, e.g. 23:00:00
###############################################################################
                                                                                                                                                                                 
class DayState(hass.Hass):
                                                                                                                                                                                 
    def initialize(self):
        time = datetime.time(0, 0, 0)                                                                                                                                            
        self.run_minutely(self.day_state, time)                                                                                                                                  
                                                                                                                                                                                 
    def day_state(self, kwargs):
        option = "Tag Wochentag"
        morning_time = self.args["morning_time"]
        day_time = self.args["day_time"]
        night_time = self.args["night_time"]
        week_state = "Wochentag"
        day_number = datetime.datetime.today().weekday()                                                                                                                         
                                                                                                                                                                                 
        if day_number < 5:
            week_state = "Wochentag"
        else:
            week_state = "Wochenende"
                                                                                                                                                                                 
        self.log(week_state)                                                                                                                                                     
                                                                                                                                                                                 
        if self.now_is_between(morning_time, day_time):
            option = "Morgen " + week_state
            self.log(option)                                                                                                                                                     
        elif self.now_is_between(day_time, night_time):
            option = "Tag " + week_state
            self.log(option)                                                                                                                                                     
        elif self.now_is_between(night_time, morning_time):
            option = "Nacht " + week_state
            self.log(option)                                                                                                                                                     
                                                                                                                                                                                 
        self.select_option("input_select.state_of_day", option)

The configuration file for the app looks like this:

State of Day:                                                                                                                                                                    
  module: state_of_day                                                                                                                                                           
  class: DayState                                                                                                                                                                
  morning_time: 05:30:00                                                                                                                                                         
  day_time: 09:30:00                                                                                                                                                             
  night_time: 23:00:00         

Am I doing something wrong?

Thanks in advance!

I solved the issue by myself. The app code had a mix of spaces and tabs, because I altered the app with nano after uploading it to the server.

in addition I had to put the time in quotes in the configuration file.