mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-25 11:46:31 +00:00
Matter fix circular references in WaterLeak and Rain sensors (#21862)
This commit is contained in:
parent
5b8638b6b8
commit
0dda8fc224
@ -24,7 +24,7 @@ import matter
|
|||||||
|
|
||||||
#@ solidify:Matter_Plugin_Virt_Sensor_Rain,weak
|
#@ solidify:Matter_Plugin_Virt_Sensor_Rain,weak
|
||||||
|
|
||||||
class Matter_Plugin_Virt_Sensor_Rain : Matter_Plugin_Virt_Sensor_Rain
|
class Matter_Plugin_Virt_Sensor_Rain : Matter_Plugin_Sensor_Rain
|
||||||
static var TYPE = "v_rain" # name of the plug-in in json
|
static var TYPE = "v_rain" # name of the plug-in in json
|
||||||
static var DISPLAY_NAME = "v.Rain" # display name of the plug-in
|
static var DISPLAY_NAME = "v.Rain" # display name of the plug-in
|
||||||
static var ARG = "" # no arg for virtual device
|
static var ARG = "" # no arg for virtual device
|
||||||
|
@ -24,7 +24,7 @@ import matter
|
|||||||
|
|
||||||
#@ solidify:Matter_Plugin_Virt_Sensor_Waterleak,weak
|
#@ solidify:Matter_Plugin_Virt_Sensor_Waterleak,weak
|
||||||
|
|
||||||
class Matter_Plugin_Virt_Sensor_Waterleak : Matter_Plugin_Virt_Sensor_Waterleak
|
class Matter_Plugin_Virt_Sensor_Waterleak : Matter_Plugin_Sensor_Waterleak
|
||||||
static var TYPE = "v_waterleak" # name of the plug-in in json
|
static var TYPE = "v_waterleak" # name of the plug-in in json
|
||||||
static var DISPLAY_NAME = "v.Waterleak" # display name of the plug-in
|
static var DISPLAY_NAME = "v.Waterleak" # display name of the plug-in
|
||||||
static var ARG = "" # no arg for virtual device
|
static var ARG = "" # no arg for virtual device
|
||||||
|
@ -21,6 +21,14 @@ import matter
|
|||||||
|
|
||||||
# this is used to solidify plugins list in Matter_Device
|
# this is used to solidify plugins list in Matter_Device
|
||||||
|
|
||||||
|
######################################################################
|
||||||
|
# Register all classes to the `matter` module before solidification
|
||||||
|
#
|
||||||
|
# Scans all classes starting with `Plugin_`
|
||||||
|
# Add to a map from class.TYPE -> class
|
||||||
|
# and set an attribute `plugins_classes` to the module `matter`
|
||||||
|
# before final solidification.
|
||||||
|
######################################################################
|
||||||
def register_native_classes()
|
def register_native_classes()
|
||||||
var plugins_classes = {}
|
var plugins_classes = {}
|
||||||
# try to register any class that starts with 'Plugin_'
|
# try to register any class that starts with 'Plugin_'
|
||||||
|
@ -9,10 +9,10 @@ extern const bclass be_class_Matter_Plugin_Virt_Sensor_Rain;
|
|||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified class: Matter_Plugin_Virt_Sensor_Rain
|
** Solidified class: Matter_Plugin_Virt_Sensor_Rain
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
extern const bclass be_class_Matter_Plugin_Virt_Sensor_Rain;
|
extern const bclass be_class_Matter_Plugin_Sensor_Rain;
|
||||||
be_local_class(Matter_Plugin_Virt_Sensor_Rain,
|
be_local_class(Matter_Plugin_Virt_Sensor_Rain,
|
||||||
0,
|
0,
|
||||||
&be_class_Matter_Plugin_Virt_Sensor_Rain,
|
&be_class_Matter_Plugin_Sensor_Rain,
|
||||||
be_nested_map(5,
|
be_nested_map(5,
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
{ be_const_key_weak(VIRTUAL, 3), be_const_bool(1) },
|
{ be_const_key_weak(VIRTUAL, 3), be_const_bool(1) },
|
||||||
|
@ -9,10 +9,10 @@ extern const bclass be_class_Matter_Plugin_Virt_Sensor_Waterleak;
|
|||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Solidified class: Matter_Plugin_Virt_Sensor_Waterleak
|
** Solidified class: Matter_Plugin_Virt_Sensor_Waterleak
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
extern const bclass be_class_Matter_Plugin_Virt_Sensor_Waterleak;
|
extern const bclass be_class_Matter_Plugin_Sensor_Waterleak;
|
||||||
be_local_class(Matter_Plugin_Virt_Sensor_Waterleak,
|
be_local_class(Matter_Plugin_Virt_Sensor_Waterleak,
|
||||||
0,
|
0,
|
||||||
&be_class_Matter_Plugin_Virt_Sensor_Waterleak,
|
&be_class_Matter_Plugin_Sensor_Waterleak,
|
||||||
be_nested_map(5,
|
be_nested_map(5,
|
||||||
( (struct bmapnode*) &(const bmapnode[]) {
|
( (struct bmapnode*) &(const bmapnode[]) {
|
||||||
{ be_const_key_weak(VIRTUAL, 3), be_const_bool(1) },
|
{ be_const_key_weak(VIRTUAL, 3), be_const_bool(1) },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user