Skip to content

Commit

Permalink
Match Thermostat User Interface Configuration Cluster to spec (proj…
Browse files Browse the repository at this point in the history
…ect-chip#30325)

* Add and use enums

* ZAP regen
  • Loading branch information
andy31415 authored Nov 15, 2023
1 parent f492403 commit df3ce73
Show file tree
Hide file tree
Showing 20 changed files with 452 additions and 88 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3705,9 +3705,28 @@ provisional server cluster FanControl = 514 {

/** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */
server cluster ThermostatUserInterfaceConfiguration = 516 {
attribute enum8 temperatureDisplayMode = 0;
attribute access(write: manage) enum8 keypadLockout = 1;
attribute access(write: manage) enum8 scheduleProgrammingVisibility = 2;
enum KeypadLockoutEnum : enum8 {
kNoLockout = 0;
kLockout1 = 1;
kLockout2 = 2;
kLockout3 = 3;
kLockout4 = 4;
kLockout5 = 5;
}

enum ScheduleProgrammingVisibilityEnum : enum8 {
kScheduleProgrammingPermitted = 0;
kScheduleProgrammingDenied = 1;
}

enum TemperatureDisplayModeEnum : enum8 {
kCelsius = 0;
kFahrenheit = 1;
}

attribute TemperatureDisplayModeEnum temperatureDisplayMode = 0;
attribute access(write: manage) KeypadLockoutEnum keypadLockout = 1;
attribute access(write: manage) ScheduleProgrammingVisibilityEnum scheduleProgrammingVisibility = 2;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2916,8 +2916,27 @@ provisional server cluster FanControl = 514 {

/** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */
server cluster ThermostatUserInterfaceConfiguration = 516 {
attribute enum8 temperatureDisplayMode = 0;
attribute access(write: manage) enum8 keypadLockout = 1;
enum KeypadLockoutEnum : enum8 {
kNoLockout = 0;
kLockout1 = 1;
kLockout2 = 2;
kLockout3 = 3;
kLockout4 = 4;
kLockout5 = 5;
}

enum ScheduleProgrammingVisibilityEnum : enum8 {
kScheduleProgrammingPermitted = 0;
kScheduleProgrammingDenied = 1;
}

enum TemperatureDisplayModeEnum : enum8 {
kCelsius = 0;
kFahrenheit = 1;
}

attribute TemperatureDisplayModeEnum temperatureDisplayMode = 0;
attribute access(write: manage) KeypadLockoutEnum keypadLockout = 1;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1111,8 +1111,27 @@ provisional server cluster FanControl = 514 {

/** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */
server cluster ThermostatUserInterfaceConfiguration = 516 {
attribute enum8 temperatureDisplayMode = 0;
attribute access(write: manage) enum8 keypadLockout = 1;
enum KeypadLockoutEnum : enum8 {
kNoLockout = 0;
kLockout1 = 1;
kLockout2 = 2;
kLockout3 = 3;
kLockout4 = 4;
kLockout5 = 5;
}

enum ScheduleProgrammingVisibilityEnum : enum8 {
kScheduleProgrammingPermitted = 0;
kScheduleProgrammingDenied = 1;
}

enum TemperatureDisplayModeEnum : enum8 {
kCelsius = 0;
kFahrenheit = 1;
}

attribute TemperatureDisplayModeEnum temperatureDisplayMode = 0;
attribute access(write: manage) KeypadLockoutEnum keypadLockout = 1;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
23 changes: 21 additions & 2 deletions examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1369,8 +1369,27 @@ provisional client cluster FanControl = 514 {

/** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */
server cluster ThermostatUserInterfaceConfiguration = 516 {
attribute enum8 temperatureDisplayMode = 0;
attribute access(write: manage) enum8 keypadLockout = 1;
enum KeypadLockoutEnum : enum8 {
kNoLockout = 0;
kLockout1 = 1;
kLockout2 = 2;
kLockout3 = 3;
kLockout4 = 4;
kLockout5 = 5;
}

enum ScheduleProgrammingVisibilityEnum : enum8 {
kScheduleProgrammingPermitted = 0;
kScheduleProgrammingDenied = 1;
}

enum TemperatureDisplayModeEnum : enum8 {
kCelsius = 0;
kFahrenheit = 1;
}

attribute TemperatureDisplayModeEnum temperatureDisplayMode = 0;
attribute access(write: manage) KeypadLockoutEnum keypadLockout = 1;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
50 changes: 44 additions & 6 deletions examples/placeholder/linux/apps/app1/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -4528,9 +4528,28 @@ server cluster Thermostat = 513 {

/** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */
client cluster ThermostatUserInterfaceConfiguration = 516 {
attribute enum8 temperatureDisplayMode = 0;
attribute access(write: manage) enum8 keypadLockout = 1;
attribute access(write: manage) optional enum8 scheduleProgrammingVisibility = 2;
enum KeypadLockoutEnum : enum8 {
kNoLockout = 0;
kLockout1 = 1;
kLockout2 = 2;
kLockout3 = 3;
kLockout4 = 4;
kLockout5 = 5;
}

enum ScheduleProgrammingVisibilityEnum : enum8 {
kScheduleProgrammingPermitted = 0;
kScheduleProgrammingDenied = 1;
}

enum TemperatureDisplayModeEnum : enum8 {
kCelsius = 0;
kFahrenheit = 1;
}

attribute TemperatureDisplayModeEnum temperatureDisplayMode = 0;
attribute access(write: manage) KeypadLockoutEnum keypadLockout = 1;
attribute access(write: manage) optional ScheduleProgrammingVisibilityEnum scheduleProgrammingVisibility = 2;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand All @@ -4541,9 +4560,28 @@ client cluster ThermostatUserInterfaceConfiguration = 516 {

/** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */
server cluster ThermostatUserInterfaceConfiguration = 516 {
attribute enum8 temperatureDisplayMode = 0;
attribute access(write: manage) enum8 keypadLockout = 1;
attribute access(write: manage) enum8 scheduleProgrammingVisibility = 2;
enum KeypadLockoutEnum : enum8 {
kNoLockout = 0;
kLockout1 = 1;
kLockout2 = 2;
kLockout3 = 3;
kLockout4 = 4;
kLockout5 = 5;
}

enum ScheduleProgrammingVisibilityEnum : enum8 {
kScheduleProgrammingPermitted = 0;
kScheduleProgrammingDenied = 1;
}

enum TemperatureDisplayModeEnum : enum8 {
kCelsius = 0;
kFahrenheit = 1;
}

attribute TemperatureDisplayModeEnum temperatureDisplayMode = 0;
attribute access(write: manage) KeypadLockoutEnum keypadLockout = 1;
attribute access(write: manage) ScheduleProgrammingVisibilityEnum scheduleProgrammingVisibility = 2;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
50 changes: 44 additions & 6 deletions examples/placeholder/linux/apps/app2/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -4487,9 +4487,28 @@ server cluster Thermostat = 513 {

/** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */
client cluster ThermostatUserInterfaceConfiguration = 516 {
attribute enum8 temperatureDisplayMode = 0;
attribute access(write: manage) enum8 keypadLockout = 1;
attribute access(write: manage) optional enum8 scheduleProgrammingVisibility = 2;
enum KeypadLockoutEnum : enum8 {
kNoLockout = 0;
kLockout1 = 1;
kLockout2 = 2;
kLockout3 = 3;
kLockout4 = 4;
kLockout5 = 5;
}

enum ScheduleProgrammingVisibilityEnum : enum8 {
kScheduleProgrammingPermitted = 0;
kScheduleProgrammingDenied = 1;
}

enum TemperatureDisplayModeEnum : enum8 {
kCelsius = 0;
kFahrenheit = 1;
}

attribute TemperatureDisplayModeEnum temperatureDisplayMode = 0;
attribute access(write: manage) KeypadLockoutEnum keypadLockout = 1;
attribute access(write: manage) optional ScheduleProgrammingVisibilityEnum scheduleProgrammingVisibility = 2;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand All @@ -4500,9 +4519,28 @@ client cluster ThermostatUserInterfaceConfiguration = 516 {

/** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */
server cluster ThermostatUserInterfaceConfiguration = 516 {
attribute enum8 temperatureDisplayMode = 0;
attribute access(write: manage) enum8 keypadLockout = 1;
attribute access(write: manage) enum8 scheduleProgrammingVisibility = 2;
enum KeypadLockoutEnum : enum8 {
kNoLockout = 0;
kLockout1 = 1;
kLockout2 = 2;
kLockout3 = 3;
kLockout4 = 4;
kLockout5 = 5;
}

enum ScheduleProgrammingVisibilityEnum : enum8 {
kScheduleProgrammingPermitted = 0;
kScheduleProgrammingDenied = 1;
}

enum TemperatureDisplayModeEnum : enum8 {
kCelsius = 0;
kFahrenheit = 1;
}

attribute TemperatureDisplayModeEnum temperatureDisplayMode = 0;
attribute access(write: manage) KeypadLockoutEnum keypadLockout = 1;
attribute access(write: manage) ScheduleProgrammingVisibilityEnum scheduleProgrammingVisibility = 2;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
23 changes: 21 additions & 2 deletions examples/thermostat/thermostat-common/thermostat.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1642,8 +1642,27 @@ server cluster Thermostat = 513 {

/** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */
server cluster ThermostatUserInterfaceConfiguration = 516 {
attribute enum8 temperatureDisplayMode = 0;
attribute access(write: manage) enum8 keypadLockout = 1;
enum KeypadLockoutEnum : enum8 {
kNoLockout = 0;
kLockout1 = 1;
kLockout2 = 2;
kLockout3 = 3;
kLockout4 = 4;
kLockout5 = 5;
}

enum ScheduleProgrammingVisibilityEnum : enum8 {
kScheduleProgrammingPermitted = 0;
kScheduleProgrammingDenied = 1;
}

enum TemperatureDisplayModeEnum : enum8 {
kCelsius = 0;
kFahrenheit = 1;
}

attribute TemperatureDisplayModeEnum temperatureDisplayMode = 0;
attribute access(write: manage) KeypadLockoutEnum keypadLockout = 1;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,41 @@ limitations under the License.

<globalAttribute side="either" code="0xFFFD" value="2"/>

<attribute side="server" code="0x0000" define="TEMPERATURE_DISPLAY_MODE" type="enum8" min="0x00" max="0x01" writable="true" default="0x00" optional="false">TemperatureDisplayMode</attribute>
<attribute side="server" code="0x0000" define="TEMPERATURE_DISPLAY_MODE" type="TemperatureDisplayModeEnum" min="0x00" max="0x01" writable="true" default="0x00" optional="false">TemperatureDisplayMode</attribute>

<attribute side="server" code="0x0001" define="KEYPAD_LOCKOUT" type="enum8" min="0x00" max="0x05" writable="true" default="0x00" optional="false">
<attribute side="server" code="0x0001" define="KEYPAD_LOCKOUT" type="KeypadLockoutEnum" min="0x00" max="0x05" writable="true" default="0x00" optional="false">
<description>KeypadLockout</description>
<access op="read" role="view"/>
<access op="write" role="manage"/>
</attribute>

<attribute side="server" code="0x0002" define="SCHEDULE_PROGRAMMING_VISIBILITY" type="enum8" min="0x00" max="0x01" writable="true" optional="true" introducedIn="ha-1.2-05-3520-29">
<attribute side="server" code="0x0002" define="SCHEDULE_PROGRAMMING_VISIBILITY" type="ScheduleProgrammingVisibilityEnum" min="0x00" max="0x01" writable="true" optional="true" introducedIn="ha-1.2-05-3520-29">
<description>ScheduleProgrammingVisibility</description>
<access op="read" role="view"/>
<access op="write" role="manage"/>
</attribute>
</cluster>

<enum name="KeypadLockoutEnum" type="enum8">
<cluster code="0x0204"/>
<item name="NoLockout" value="0x00"/>
<item name="Lockout1" value="0x01"/>
<item name="Lockout2" value="0x02"/>
<item name="Lockout3" value="0x03"/>
<item name="Lockout4" value="0x04"/>
<item name="Lockout5" value="0x05"/>
</enum>

<enum name="ScheduleProgrammingVisibilityEnum" type="enum8">
<cluster code="0x0204"/>
<item name="ScheduleProgrammingPermitted" value="0x00"/>
<item name="ScheduleProgrammingDenied" value="0x01"/>
</enum>

<enum name="TemperatureDisplayModeEnum" type="enum8">
<cluster code="0x0204"/>
<item name="Celsius" value="0x00"/>
<item name="Fahrenheit" value="0x01"/>
</enum>

</configurator>
25 changes: 22 additions & 3 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -5088,9 +5088,28 @@ provisional client cluster FanControl = 514 {

/** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */
client cluster ThermostatUserInterfaceConfiguration = 516 {
attribute enum8 temperatureDisplayMode = 0;
attribute access(write: manage) enum8 keypadLockout = 1;
attribute access(write: manage) optional enum8 scheduleProgrammingVisibility = 2;
enum KeypadLockoutEnum : enum8 {
kNoLockout = 0;
kLockout1 = 1;
kLockout2 = 2;
kLockout3 = 3;
kLockout4 = 4;
kLockout5 = 5;
}

enum ScheduleProgrammingVisibilityEnum : enum8 {
kScheduleProgrammingPermitted = 0;
kScheduleProgrammingDenied = 1;
}

enum TemperatureDisplayModeEnum : enum8 {
kCelsius = 0;
kFahrenheit = 1;
}

attribute TemperatureDisplayModeEnum temperatureDisplayMode = 0;
attribute access(write: manage) KeypadLockoutEnum keypadLockout = 1;
attribute access(write: manage) optional ScheduleProgrammingVisibilityEnum scheduleProgrammingVisibility = 2;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down
Loading

0 comments on commit df3ce73

Please sign in to comment.