Matter fix circular references in WaterLeak and Rain sensors (#21862)

This commit is contained in:
s-hadinger 2024-07-28 18:10:25 +02:00 committed by GitHub
parent 5b8638b6b8
commit 0dda8fc224
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 14 additions and 6 deletions

View File

@ -24,7 +24,7 @@ import matter
#@ 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 DISPLAY_NAME = "v.Rain" # display name of the plug-in
static var ARG = "" # no arg for virtual device

View File

@ -24,7 +24,7 @@ import matter
#@ 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 DISPLAY_NAME = "v.Waterleak" # display name of the plug-in
static var ARG = "" # no arg for virtual device

View File

@ -21,6 +21,14 @@ import matter
# 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()
var plugins_classes = {}
# try to register any class that starts with 'Plugin_'

View File

@ -9,10 +9,10 @@ extern const bclass be_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,
0,
&be_class_Matter_Plugin_Virt_Sensor_Rain,
&be_class_Matter_Plugin_Sensor_Rain,
be_nested_map(5,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(VIRTUAL, 3), be_const_bool(1) },

View File

@ -9,10 +9,10 @@ extern const bclass be_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,
0,
&be_class_Matter_Plugin_Virt_Sensor_Waterleak,
&be_class_Matter_Plugin_Sensor_Waterleak,
be_nested_map(5,
( (struct bmapnode*) &(const bmapnode[]) {
{ be_const_key_weak(VIRTUAL, 3), be_const_bool(1) },