Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for switching percentage-values (Dimming, Shutter, etc) #127

Open
psi-4ward opened this issue Dec 18, 2020 · 4 comments
Open

Support for switching percentage-values (Dimming, Shutter, etc) #127

psi-4ward opened this issue Dec 18, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@psi-4ward
Copy link

Hi,
are there any plans to support Devices which are controlled 0..100% like dimmers, shutters and so on?

Greets

@sieren
Copy link
Owner

sieren commented Dec 19, 2020

Not yet, but it crossed my mind. Would require a different UI though. I'll think about what would be a good approach

@sieren sieren added the enhancement New feature or request label Dec 19, 2020
@psi-4ward
Copy link
Author

Not as trivial as a on/off switch. I think about a button which opens a new "fullscreen" page some arrows to step up/down and some buttons to: go-back, set a predefined value (OFF, 25%, 50%, 75%, 100%) or smth like that.

@sieren
Copy link
Owner

sieren commented Feb 14, 2021

Could need some more input to consider doing this.
What would the configuration look like for this? /bla/device/brightness/ ? What's the common type for brightness? String? Integer? Float?
What is the common value range for brightness (0..0.5...1? 0...127...256? ) and how would someone configure this.

@htvekov
Copy link

htvekov commented Feb 18, 2021

Hi' Matt.

Both Z2M and HA uses integer 0-254 for brightness.
Using MQTT commands for Z2M lights or direct HA service calls with brightness: 0 not only dims light completely, but also turn off actual device as well.
Don't know how brightness: 0 behaves in other environments.

Z2M set command:

topic: zigbee2mqtt/FRIENDLY_NAME/set
payload: {"brightness": VALUE}

Z2M get command:

topic: zigbee2mqtt/FRIENDLY_NAME/get
payload: {"brightness": ""}

Bulb will return current value in device state payload:

topic: zigbee2mqtt/FRIENDLY_NAME
payload: {"brightness":254,"color_temp":370,"linkquality":107,"state":"ON","update":{"state":"idle"},"update_available":false}

Both HA and Z2m uses standard mired scale for setting bulbs color_temp. The largest span for bulbs I've got, goes from 153 to 500 on the mired scale. Value is an integer as well.

Z2M command structure is completely identical. Only json key is color_temp instead of brightness

Ciao !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants