richibrics / IoTuring

Your Windows, Linux, macOS computer as MQTT and HomeAssistant integration
https://pypi.org/project/IoTuring/
GNU General Public License v3.0
82 stars 6 forks source link

implement displaybrightness for linux with acpi #117

Closed lockenkop closed 2 months ago

lockenkop commented 4 months ago

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.rules

ACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chgrp video $sys$devpath/brightness", RUN+="/bin/chmod g+w $sys$devpath/brightness"

infeeeee commented 2 months ago

@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.