implement displaybrightness for linux with acpi#117
implement displaybrightness for linux with acpi#117lockenkop wants to merge 1 commit intorichibrics:mainfrom
Conversation
| name: Terminal Button | ||
| icon: mdi:console | ||
| custom_type: button | ||
| Brightness: |
There was a problem hiding this comment.
You can create a light entity, it would fit better:
There was a problem hiding this comment.
Yes that would integrate really well
There was a problem hiding this comment.
You can create a light entity, it would fit better:
* https://developers.home-assistant.io/docs/core/entity/light * https://www.home-assistant.io/integrations/light.mqtt/
What do you mean by "create"?
I agree with it fitting better than 'number' as EntityType. Although the LightEntity is pretty powerfull and DisplayBacklights will not be able to gain from those capabilities like RGB, Hue, Saturation controls.
Also LightEntity gets a binary state as the default control, which is not fitting for displaybacklights.

|
@lockenkop I rewrote this as HA light, please check #124 Create PRs to that branch. I cherrypicked your commit, so your work isn't lost. The udev rule should be documented somewhere, maybe on the readme. I think this can be closed, let's continue over there. |


This implements the brightness Entity on Linux using ACPI.
https://wiki.archlinux.org/title/backlight
Maybe this UDEV rule is needed on some systems, mine didnt need it.
/etc/udev/rules.d/backlight.rulesACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chgrp video $sys$devpath/brightness", RUN+="/bin/chmod g+w $sys$devpath/brightness"