Skip to content

Commit cbf664f

Browse files
authored
Generate EnergyPreference cluster with Alchemy (#38063)
1 parent e796147 commit cbf664f

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<!--
3-
Copyright (c) 2023 Project CHIP Authors
3+
Copyright (c) 2023-2025 Project CHIP Authors
44
Licensed under the Apache License, Version 2.0 (the "License");
55
you may not use this file except in compliance with the License.
66
You may obtain a copy of the License at
@@ -11,7 +11,13 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1111
See the License for the specific language governing permissions and
1212
limitations under the License.
1313
-->
14-
<configurator>
14+
<!--
15+
XML generated by Alchemy; DO NOT EDIT.
16+
Source: src/app_clusters/EnergyPreference.adoc
17+
Parameters: in-progress
18+
Git:
19+
-->
20+
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
1521
<domain name="Energy Management"/>
1622
<cluster apiMaturity="provisional">
1723
<name>Energy Preference</name>
@@ -23,23 +29,20 @@ limitations under the License.
2329
<description>This cluster provides an interface to specify preferences for how devices should consume energy.</description>
2430
<!--Attributes-->
2531
<globalAttribute side="either" code="0xFFFD" value="1"/>
26-
2732
<features>
2833
<feature bit="0" code="BALA" name="EnergyBalance" summary="Device can balance energy consumption vs. another priority">
29-
<optionalConform choice="a" more="true"/>
34+
<optionalConform choice="a" more="true" min="1"/>
3035
</feature>
3136
<feature bit="1" code="LPMS" name="LowPowerModeSensitivity" summary="Device can adjust the conditions for entering a low power mode">
32-
<optionalConform choice="a" more="true"/>
37+
<optionalConform choice="a" more="true" min="1"/>
3338
</feature>
3439
</features>
35-
3640
<!--Conformance feature BALA - for now optional-->
37-
<attribute code="0x0000" side="server" name="EnergyBalances" type="array" entryType="BalanceStruct" define="ENERGY_PREFERENCE_ENERGY_BALANCES" min="2" max="10" optional="true">
41+
<attribute code="0x0000" side="server" name="EnergyBalances" type="array" entryType="BalanceStruct" define="ENERGY_PREFERENCE_ENERGY_BALANCES" optional="true" length="10" minLength="2">
3842
<mandatoryConform>
3943
<feature name="BALA"/>
4044
</mandatoryConform>
4145
</attribute>
42-
4346
<!--Conformance feature BALA - for now optional-->
4447
<attribute code="0x0001" side="server" name="CurrentEnergyBalance" type="int8u" define="ENERGY_PREFERENCE_CURRENT_ENERGY_BALANCE" writable="true" optional="true">
4548
<access op="read" privilege="view"/>
@@ -48,31 +51,26 @@ limitations under the License.
4851
<feature name="BALA"/>
4952
</mandatoryConform>
5053
</attribute>
51-
5254
<!--Conformance feature BALA - for now optional-->
53-
<attribute code="0x0002" side="server" name="EnergyPriorities" type="array" entryType="EnergyPriorityEnum" define="ENERGY_PREFERENCE_ENERGY_PRIORITIES" max="2" optional="true">
55+
<attribute code="0x0002" side="server" name="EnergyPriorities" type="array" entryType="EnergyPriorityEnum" define="ENERGY_PREFERENCE_ENERGY_PRIORITIES" optional="true" length="2" minLength="2">
5456
<mandatoryConform>
5557
<feature name="BALA"/>
5658
</mandatoryConform>
5759
</attribute>
58-
5960
<!--Conformance feature LPMS - for now optional-->
60-
<attribute code="0x0003" side="server" name="LowPowerModeSensitivities" type="array" entryType="BalanceStruct" define="ENERGY_PREFERENCE_LOW_POWER_MODE_SENSITIVITIES" min="2" max="10" optional="true">
61+
<attribute code="0x0003" side="server" name="LowPowerModeSensitivities" type="array" entryType="BalanceStruct" define="ENERGY_PREFERENCE_LOW_POWER_MODE_SENSITIVITIES" optional="true" length="10" minLength="2">
6162
<mandatoryConform>
6263
<feature name="LPMS"/>
6364
</mandatoryConform>
6465
</attribute>
65-
6666
<!--Conformance feature LPMS - for now optional-->
67-
<attribute code="0x0004" side="server" type="int8u" define="ENERGY_PREFERENCE_CURRENT_LOW_POWER_MODE_SENSITIVITY" writable="true" optional="true">
67+
<attribute code="0x0004" side="server" name="CurrentLowPowerModeSensitivity" type="int8u" define="ENERGY_PREFERENCE_CURRENT_LOW_POWER_MODE_SENSITIVITY" writable="true" optional="true">
6868
<access op="read" privilege="view"/>
6969
<access op="write" privilege="operate"/>
70-
<description>CurrentLowPowerModeSensitivity</description>
7170
<mandatoryConform>
7271
<feature name="LPMS"/>
7372
</mandatoryConform>
7473
</attribute>
75-
7674
</cluster>
7775

7876
<enum name="EnergyPriorityEnum" type="enum8">
@@ -85,8 +83,7 @@ limitations under the License.
8583

8684
<struct name="BalanceStruct">
8785
<cluster code="0x009B"/>
88-
<item name="Step" type="percent"/>
89-
<item name="Label" type="char_string" optional="true" length="64"/>
86+
<item fieldId="0" name="Step" type="percent"/>
87+
<item fieldId="1" name="Label" type="char_string" optional="true" length="64"/>
9088
</struct>
91-
9289
</configurator>

0 commit comments

Comments
 (0)