Support multiple devices

This commit is contained in:
2024-11-17 17:30:09 +01:00
parent ea9f35f3b6
commit 0d9d03ce4d

View File

@@ -4,7 +4,7 @@
# #
#pylint: disable=line-too-long,broad-exception-caught,possibly-used-before-assignment #pylint: disable=line-too-long,broad-exception-caught,possibly-used-before-assignment
""" """
<plugin key="Heatzy_FJU" name="Heatzy Pilote" author="fjumelle" version="1.0.4" wikilink="" externallink=""> <plugin key="Heatzy_FJU" name="Heatzy Pilote" author="fjumelle" version="1.1.0" wikilink="" externallink="">
<description> <description>
<h2>Heatzy Pilote</h2><br/> <h2>Heatzy Pilote</h2><br/>
Implementation of Heatzy Pilote as a Domoticz Plugin.<br/> Implementation of Heatzy Pilote as a Domoticz Plugin.<br/>
@@ -41,9 +41,6 @@ if None is not None: #Fake statement to remove warning on global Domoticz variab
Images = Images # type: ignore #NOSONAR #pylint: disable=undefined-variable,self-assigning-variable Images = Images # type: ignore #NOSONAR #pylint: disable=undefined-variable,self-assigning-variable
Devices = Devices # type: ignore #NOSONAR #pylint: disable=undefined-variable,self-assigning-variable Devices = Devices # type: ignore #NOSONAR #pylint: disable=undefined-variable,self-assigning-variable
global Parameters
global Devices
HEATZY_MODE = { HEATZY_MODE = {
'停止': 'OFF', '停止': 'OFF',
'解冻': 'FROSTFREE', '解冻': 'FROSTFREE',
@@ -335,7 +332,7 @@ class BasePlugin:
elif 'attr' in response and len(response["attr"]) == 0: elif 'attr' in response and len(response["attr"]) == 0:
#attr is empty... #attr is empty...
Domoticz.Status("We force a setMode to try to get the correct mode at the next try...") Domoticz.Status("We force a setMode to try to get the correct mode at the next try...")
self.setMode(HEATZY_MODE_VALUE['FROSTFREE']) self.set_mode(HEATZY_MODE_VALUE['FROSTFREE'])
return "" return ""
return mode return mode