Skip to content

Instantly share code, notes, and snippets.

@lmeulen
Last active May 31, 2021 19:45
Show Gist options
  • Save lmeulen/677acba5e976ed0985c25981aee5e416 to your computer and use it in GitHub Desktop.
Save lmeulen/677acba5e976ed0985c25981aee5e416 to your computer and use it in GitHub Desktop.
Screens_emptyscript
import utils, logging
STATUS_FILE = "example.dat"
def run():
logger = logging.getLogger('home automation')
logger.debug("Script: Example script")
example_bool = utils.get_current_status(STATUS_FILE, default=False)
logger.debug("Example bool: " + str(example_bool))
example_bool = not example_bool
utils.save_current_state(STATUS_FILE, example_bool)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment