|
|
|
@ -20,11 +20,13 @@ if TYPE_CHECKING:
|
|
|
|
|
|
|
|
|
|
|
|
READY_FILE = os.getenv("READY_FILE", "/tmp/amcrest2mqtt.ready")
|
|
|
|
READY_FILE = os.getenv("READY_FILE", "/tmp/amcrest2mqtt.ready")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ConfigError(ValueError):
|
|
|
|
class ConfigError(ValueError):
|
|
|
|
"""Raised when the configuration file is invalid."""
|
|
|
|
"""Raised when the configuration file is invalid."""
|
|
|
|
|
|
|
|
|
|
|
|
pass
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class HelpersMixin:
|
|
|
|
class HelpersMixin:
|
|
|
|
async def build_device_states(self: Amcrest2Mqtt, device_id: str) -> bool:
|
|
|
|
async def build_device_states(self: Amcrest2Mqtt, device_id: str) -> bool:
|
|
|
|
if self.is_rebooting(device_id):
|
|
|
|
if self.is_rebooting(device_id):
|
|
|
|
|