marcfager / nspanel-mf

Custom HMI controlled by ESPHome for the Sonoff NSPanel. Includes media player card and home screen with weather data and clock. More to come.
215 stars 60 forks source link

Dim screen when not used and wake up when used #2

Closed sisimomo closed 2 years ago

sisimomo commented 2 years ago

Hi, just wanting to share with you a great video that could help you in your todo element : "Dim screen when not used and wake up when used."

Very great project I very like it! Thanks!

marcfager commented 2 years ago

Hi,

Thank you for the link and the feedback! I have used many parts of Masto's implementations in my code. I think the most challenging thing with dimming the screen is to define how it should be done. As the Home page shows the temperature, which I find convenient, I would almost like to keep the screen on at all times. At the same time, a screen that is on all the time can also be annoying as it catches the eye too easily. Also, the life time is limited. With a minimum backlight the temperature is still visible.

Currently I am testing a idea to change automatically back to the Home page from the other pages after 15 sec of inactivity. After further 30 sec the screen is dimmed down to 1 % backlight. I think I will add a feature to black out the screen with Masto's implementation once the screen has been inactive for 5 min. Also, if all lights are off in the house (sleeping) or the alarm is turned on (away), the screen should be off. I also want to be able to wake the screen up slightly (to 1 % backlight) or completely from HA. Once I have implemented and evaluated this, I will add it to the code. :)

sisimomo commented 2 years ago

I understand! Seems reasonable to me.

Thanks for your work.