X-Git-Url: https://git.ralfj.de/saartuer.git/blobdiff_plain/73cd08c855a77bc0df90d6e94f6d75d42d6f5e5e..8fa0d3c2b93ded551a61f48e2c8701e5f2370b76:/statemachine.py diff --git a/statemachine.py b/statemachine.py index dd9dc54..cb1e4c8 100644 --- a/statemachine.py +++ b/statemachine.py @@ -12,7 +12,7 @@ def play_sound (what): return soundfile = SOUNDS_DIRECTORY + what + '/' + random.choice(soundfiles) hour = datetime.datetime.time(datetime.datetime.now()).hour - volume = 60 if hour >= 22 or hour <= 6 else 95 + volume = 60 if hour >= 22 or hour <= 6 else 90 fire_and_forget_cmd ([SOUNDS_PLAYER, "-volume", str(volume), soundfile], "StateMachine: ") # convert an absolute nervlist to a relative one @@ -380,6 +380,6 @@ class StateMachine(): while newstate is not None: assert isinstance(newstate, StateMachine.State), "I should get a state" self.current_state.on_leave() - logger.debug("StateMachine: Doing state transition %s -> %s" % (self.current_state.__class__.__name__, newstate.__class__.__name__)) + logger.info("StateMachine: Doing state transition %s -> %s" % (self.current_state.__class__.__name__, newstate.__class__.__name__)) self.current_state = newstate newstate = self.current_state.handle_event(StateMachine.CMD_PINS, self.pins)