Blackymas / NSPanel_HA_Blueprint

This allows you to configure your complete NSPanel via Blueprint with UI and without changing anything in the code
1.24k stars 233 forks source link

`Enhancement` Keep the screen on while sensor is active #1953

Open nijel opened 2 months ago

nijel commented 2 months ago

Enhancement Summary

System settings - Wake-up sensors should keep the screen on as long as sensor is active.

Detailed Description

I have a motion sensor in a room where NSPanel is placed, and I want NSPanel to be on as long as there is motion going on. Currently, it only turns on when motion is detected for the first time, and then the usual dimming and sleep timeouts apply.

Additional Context

Thanks for this blueprint, it works great!

sgurgul commented 2 months ago

@nijel May I ask how do you wake up the screen ? What action do you do on nspanel device to turn it's (sleeping) screen on ?

nijel commented 2 months ago

The motion sensor is selected in blueprint (System settings - Wake-up sensors).

sgurgul commented 2 months ago

Yes, useful, indeed. And the improvement proposed in this ticket would be very welcome as well :) Thank you for answer.

snizzleorg commented 1 month ago

It would be great if this also could be connected to the state of the lights in the room. lights on => no switching off display, lights off => light goes off after delay.

arielwulkan commented 1 month ago

Also would be great to have API command to keep screen on regardless of sensor

mcsdodo commented 2 weeks ago

+1 on this. I'm using one panel as a "dashboard" under my PC monitor. Would be nice if it could be always-on as long as I'm in the room (this I have handled by ble presence).

For anyone who comes while it's implemented here's my workaround:

  1. input_boolean.keep_nspanel_alive
  2. an automation that calls homeassistant.toggle on that helper every 30 seconds. I also check for my presence in the room as an aditional condition.
  3. binary_sensor with template something like this "{{ (utcnow().replace(tzinfo=None) - as_datetime(states.input_boolean.keep_nspanel_alive.last_changed).replace(tzinfo=None)).seconds > 5 }}"
  4. nspanel config with wake_up_sensors: - binary_sensor.keep_nspanel_alive