@@ -1946,6 +1946,77 @@ esp_err_t add(endpoint_t *endpoint, config_t *config)
1946
1946
}
1947
1947
} /* secondary_network_interface */
1948
1948
1949
+ namespace mounted_on_off_control {
1950
+ uint32_t get_device_type_id ()
1951
+ {
1952
+ return ESP_MATTER_MOUNTED_ON_OFF_CONTROL_DEVICE_TYPE_ID;
1953
+ }
1954
+
1955
+ uint8_t get_device_type_version ()
1956
+ {
1957
+ return ESP_MATTER_MOUNTED_ON_OFF_CONTROL_DEVICE_TYPE_VERSION;
1958
+ }
1959
+
1960
+ endpoint_t *create (node_t *node, config_t *config, uint8_t flags, void *priv_data)
1961
+ {
1962
+ return common::create<config_t >(node, config, flags, priv_data, add);
1963
+ }
1964
+
1965
+ esp_err_t add (endpoint_t *endpoint, config_t *config)
1966
+ {
1967
+ VerifyOrReturnError (endpoint != nullptr , ESP_ERR_INVALID_ARG, ESP_LOGE (TAG, " Endpoint cannot be NULL" ));
1968
+ esp_err_t err = add_device_type (endpoint, get_device_type_id (), get_device_type_version ());
1969
+ if (err != ESP_OK) {
1970
+ ESP_LOGE (TAG, " Failed to add device type id:%" PRIu32 " ,err: %d" , get_device_type_id (), err);
1971
+ return err;
1972
+ }
1973
+
1974
+ cluster_t *identify_cluster = identify::create (endpoint, &(config->identify ), CLUSTER_FLAG_SERVER);
1975
+ identify::command::create_trigger_effect (identify_cluster);
1976
+ groups::create (endpoint, &(config->groups ), CLUSTER_FLAG_SERVER);
1977
+ on_off::create (endpoint, &(config->on_off ), CLUSTER_FLAG_SERVER, on_off::feature::lighting::get_id ());
1978
+
1979
+ return ESP_OK;
1980
+ }
1981
+
1982
+ } /* mounted_on_off_control */
1983
+
1984
+ namespace mounted_dimmable_load_control {
1985
+ uint32_t get_device_type_id ()
1986
+ {
1987
+ return ESP_MATTER_MOUNTED_DIMMABLE_LOAD_CONTROL_DEVICE_TYPE_ID;
1988
+ }
1989
+
1990
+ uint8_t get_device_type_version ()
1991
+ {
1992
+ return ESP_MATTER_MOUNTED_DIMMABLE_LOAD_CONTROL_DEVICE_TYPE_VERSION;
1993
+ }
1994
+
1995
+ endpoint_t *create (node_t *node, config_t *config, uint8_t flags, void *priv_data)
1996
+ {
1997
+ return common::create<config_t >(node, config, flags, priv_data, add);
1998
+ }
1999
+
2000
+ esp_err_t add (endpoint_t *endpoint, config_t *config)
2001
+ {
2002
+ VerifyOrReturnError (endpoint != nullptr , ESP_ERR_INVALID_ARG, ESP_LOGE (TAG, " Endpoint cannot be NULL" ));
2003
+ esp_err_t err = add_device_type (endpoint, get_device_type_id (), get_device_type_version ());
2004
+ if (err != ESP_OK) {
2005
+ ESP_LOGE (TAG, " Failed to add device type id:%" PRIu32 " ,err: %d" , get_device_type_id (), err);
2006
+ return err;
2007
+ }
2008
+
2009
+ cluster_t *identify_cluster = identify::create (endpoint, &(config->identify ), CLUSTER_FLAG_SERVER);
2010
+ identify::command::create_trigger_effect (identify_cluster);
2011
+ groups::create (endpoint, &(config->groups ), CLUSTER_FLAG_SERVER);
2012
+ on_off::create (endpoint, &(config->on_off ), CLUSTER_FLAG_SERVER, on_off::feature::lighting::get_id ());
2013
+ level_control::create (endpoint, &(config->level_control ), CLUSTER_FLAG_SERVER,
2014
+ level_control::feature::on_off::get_id () | level_control::feature::lighting::get_id ());
2015
+
2016
+ return ESP_OK;
2017
+ }
2018
+ } /* mounted_dimmable_load_control */
2019
+
1949
2020
} /* endpoint */
1950
2021
1951
2022
namespace node {
0 commit comments