Skip to content

Conversation

@lockenkop
Copy link
Contributor

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"

@lockenkop lockenkop marked this pull request as ready for review July 22, 2024 11:29
name: Terminal Button
icon: mdi:console
custom_type: button
Brightness:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Owner

Choose a reason for hiding this comment

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

Yes that would integrate really well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed it to custom_type : light.
The EntityType changes, but i dont get the interface to change.
image
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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

@infeeeee infeeeee mentioned this pull request Sep 22, 2024
@infeeeee
Copy link
Collaborator

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

@infeeeee infeeeee closed this Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants