X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=site_config.py;h=e3b186daa2839c79063ca399997db1f9508fd021;hb=ed8fa2b10b0177b15b7423263bdd390efde2f0c8;hp=332731277dde2ef16b983da04e749ba19975c496;hpb=7e6972bc7c8e891dc669645fa5969ed76fe38314;p=python_utils.git diff --git a/site_config.py b/site_config.py index 3327312..e3b186d 100644 --- a/site_config.py +++ b/site_config.py @@ -3,8 +3,9 @@ from dataclasses import dataclass import logging import platform -from typing import Callable, Optional +from typing import Callable +# Note: this module is fairly early loaded. Be aware of dependencies. import config import presence @@ -31,6 +32,7 @@ class SiteConfig(object): network_router_ip: str presence_location: presence.Location is_anyone_present: Callable[None, bool] + arper_minimum_device_count: int def get_location(): @@ -78,6 +80,7 @@ def get_config(): network_router_ip = '10.0.0.1', presence_location = presence.Location.HOUSE, is_anyone_present = lambda x=presence.Location.HOUSE: is_anyone_present_wrapper(x), + arper_minimum_device_count = 50, ) elif location == 'CABIN': return SiteConfig( @@ -87,6 +90,7 @@ def get_config(): network_router_ip = '192.168.0.1', presence_location = presence.Location.CABIN, is_anyone_present = lambda x=presence.Location.CABIN: is_anyone_present_wrapper(x), + arper_minimum_device_count = 15, ) else: raise Exception(f'Unknown site location: {location}')