Skip to content

Conversation

@Hannes-Beckmann
Copy link

Description of Change

This pull request introduces a new Zigbee Temperature Dimmable Light endpoint.

Test Scenarios

I have tested this Pull Request with pioarduino with the esp32-c6-devkitm-1 board on an ESP32-C6-MINI-1U using the ZHA-Integration in Home Assistant.
The included example is not tested since I do not have access to a board with a built-in RGB-LED.

Screenshot 2025-11-15 125912 Screenshot 2025-11-15 125927

Note that the minimum and maximum temperature is not respected by Home Assistant. Out of range values are clamped.

@CLAassistant
Copy link

CLAassistant commented Nov 15, 2025

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link
Contributor

Warnings
⚠️

Some issues found for the commit messages in this PR:

  • the commit message "Add Temperature Dimmable Light":
    • summary looks empty
    • type/action looks empty
  • the commit message "Add documentation":
    • summary looks empty
    • type/action looks empty
  • the commit message "Add example":
    • summary looks empty
    • type/action looks empty
  • the commit message "Test to use the right Core":
    • summary looks empty
    • type/action looks empty
  • the commit message "Undo test":
    • summary looks empty
    • type/action looks empty

Please fix these commit messages - here are some basic tips:

  • follow Conventional Commits style
  • correct format of commit message should be: <type/action>(<scope/component>): <summary>, for example fix(esp32): Fixed startup timeout issue
  • allowed types are: change,ci,docs,feat,fix,refactor,remove,revert,test
  • sufficiently descriptive message summary should be between 10 to 72 characters and start with upper case letter
  • avoid Jira references in commit messages (unavailable/irrelevant for our customers)

TIP: Install pre-commit hooks and run this check when committing (uses the Conventional Precommit Linter).

👋 Hello Hannes-Beckmann, we appreciate your contribution to this project!


📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more.

🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project.

Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- Resolve all warnings (⚠️ ) before requesting a review from human reviewers - they will appreciate it.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against e046998

Copy link
Member

@P-R-O-C-H-Y P-R-O-C-H-Y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Hannes-Beckmann, thank you for your addition to the Zigbee Library.
I have tested using a HA (ZHA) and a C6 with RGB light and it works as a charm.

I have requested a few changes to make the API as close to the other Light endpoints.

Comment on lines +1 to +3
###############################
ZigbeeTemperatureDimmableLight
###############################
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting issue

Suggested change
###############################
ZigbeeTemperatureDimmableLight
###############################
##############################
ZigbeeTemperatureDimmableLight
##############################

Comment on lines +87 to +98
setColorTemperature
^^^^^^^^^^^^^^^^^^^

Sets the light color temperature (in mireds).

.. code-block:: arduino
bool setColorTemperature(uint16_t mireds);
* ``mireds`` - Color temperature in mireds (153 = 6500K, 500 = 2000K)

Returns ``true`` if successful, ``false`` otherwise.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update to preferred API change

Suggested change
setColorTemperature
^^^^^^^^^^^^^^^^^^^
Sets the light color temperature (in mireds).
.. code-block:: arduino
bool setColorTemperature(uint16_t mireds);
* ``mireds`` - Color temperature in mireds (153 = 6500K, 500 = 2000K)
Returns ``true`` if successful, ``false`` otherwise.
setLightTemperature
^^^^^^^^^^^^^^^^^^^
Sets the light color temperature (in mireds).
.. code-block:: arduino
bool setLightTemperature(uint16_t mireds);
* ``mireds`` - Color temperature in mireds (153 = 6500K, 500 = 2000K)
Returns ``true`` if successful, ``false`` otherwise.

Comment on lines +154 to +163
getColorTemperature
^^^^^^^^^^^^^^^^^^^

Gets the current color temperature (in mireds).

.. code-block:: arduino
uint16_t getColorTemperature();
Returns current color temperature in mireds.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
getColorTemperature
^^^^^^^^^^^^^^^^^^^
Gets the current color temperature (in mireds).
.. code-block:: arduino
uint16_t getColorTemperature();
Returns current color temperature in mireds.
getLightTemperature
^^^^^^^^^^^^^^^^^^^
Gets the current color temperature (in mireds).
.. code-block:: arduino
uint16_t getLightTemperature();
Returns current color temperature in mireds.


#include "Zigbee.h"

#define ZIGBEE_TEMP_LIGHT_ENDPOINT 11
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Start from endpoint number 1. No need to be using number 11

Suggested change
#define ZIGBEE_TEMP_LIGHT_ENDPOINT 11
#define ZIGBEE_TEMP_LIGHT_ENDPOINT 1

* @brief This example demonstrates Zigbee Temperature Dimmable light bulb.
*
* The example demonstrates how to use Zigbee library to create an end device with
* temperature dimmable light end point.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* temperature dimmable light end point.
* temperature dimmable light endpoint.

#include "ep/ZigbeeSwitch.h"
//// Lights
#include "ep/ZigbeeColorDimmableLight.h"
#include "ep/ZigbeeTemperatureDimmableLight.h"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick here, please use Alphabetical order, so place it on last place in Lights group

Comment on lines +153 to +155
bool ZigbeeTemperatureDimmableLight::setColorTemperature(uint16_t mireds) {
return setLight(_current_state, _current_level, mireds);
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer the setLightTemperature method name instead.

Suggested change
bool ZigbeeTemperatureDimmableLight::setColorTemperature(uint16_t mireds) {
return setLight(_current_state, _current_level, mireds);
}
bool ZigbeeTemperatureDimmableLight::setLightTemperature(uint16_t mireds) {
return setLight(_current_state, _current_level, mireds);
}


bool setLightState(bool state);
bool setLightLevel(uint8_t level);
bool setColorTemperature(uint16_t mireds);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer the setLightTemperature API name instead

Suggested change
bool setColorTemperature(uint16_t mireds);
bool setLightTemperature(uint16_t mireds);

Comment on lines +101 to +103
uint16_t getColorTemperature() {
return _current_color_temperature;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, will prefer the getLightTemperature instead.

Suggested change
uint16_t getColorTemperature() {
return _current_color_temperature;
}
uint16_t getLightTemperature() {
return _current_color_temperature;
}

@P-R-O-C-H-Y P-R-O-C-H-Y added Area: Zigbee Issues and Feature Request about Zigbee Status: Awaiting Response Awaiting a response from the author labels Nov 18, 2025
@github-actions
Copy link
Contributor

Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit e046998.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Zigbee Issues and Feature Request about Zigbee Status: Awaiting Response Awaiting a response from the author

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants