Fix heartbeat + remove warnings

This commit is contained in:
2024-12-15 22:37:53 +01:00
parent 268d9bbc54
commit 8403909c43

View File

@@ -1,3 +1,5 @@
"""Module simulating Domoticz"""
#pylint: disable=invalid-name, missing-function-docstring, missing-class-docstring, redefined-outer-name
from datetime import datetime from datetime import datetime
Images = {} Images = {}
@@ -17,7 +19,6 @@ class DzImage(object):
self.__name = name[:-4] self.__name = name[:-4]
def Create(self): def Create(self):
global Images
Images[self.__name] = ImageObj(self) Images[self.__name] = ImageObj(self)
################### ###################
@@ -33,7 +34,6 @@ class DeviceObj(object):
__unit=None __unit=None
__switchtype=None __switchtype=None
__options=None __options=None
__image=None
__used=None __used=None
def __init__(self, Unit=None, Name=None, Type=None, TypeName=None, Subtype=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 self.__data = kwargs
def Create(self): def Create(self):
global Devices
Devices[self.__data["Unit"]] = DeviceObj(**self.__data) Devices[self.__data["Unit"]] = DeviceObj(**self.__data)
################### ###################
@@ -152,6 +151,7 @@ def Error(message):
def Heartbeat(duration): def Heartbeat(duration):
"""Heartbeat""" """Heartbeat"""
domo.Heartbeat(duration)
def DomoticzImage(name): def DomoticzImage(name):
"""Image""" """Image"""