From 8403909c436cac8055b912fa447adf7eb0044052 Mon Sep 17 00:00:00 2001 From: Francois JUMELLE Date: Sun, 15 Dec 2024 22:37:53 +0100 Subject: [PATCH] Fix heartbeat + remove warnings --- Domoticz.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Domoticz.py b/Domoticz.py index 7890103..d124021 100644 --- a/Domoticz.py +++ b/Domoticz.py @@ -1,3 +1,5 @@ +"""Module simulating Domoticz""" +#pylint: disable=invalid-name, missing-function-docstring, missing-class-docstring, redefined-outer-name from datetime import datetime Images = {} @@ -17,7 +19,6 @@ class DzImage(object): self.__name = name[:-4] def Create(self): - global Images Images[self.__name] = ImageObj(self) ################### @@ -33,7 +34,6 @@ class DeviceObj(object): __unit=None __switchtype=None __options=None - __image=None __used=None def __init__(self, Unit=None, Name=None, Type=None, TypeName=None, Subtype=None, Switchtype=None, Options=None, Image=None, Used=None): @@ -81,7 +81,6 @@ class DzDevice(object): self.__data = kwargs def Create(self): - global Devices Devices[self.__data["Unit"]] = DeviceObj(**self.__data) ################### @@ -152,6 +151,7 @@ def Error(message): def Heartbeat(duration): """Heartbeat""" + domo.Heartbeat(duration) def DomoticzImage(name): """Image"""