Blackymas / NSPanel_HA_Blueprint

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

Feature Request: Expose screen on/off status as an entity in HomeAssistant #1035

Closed romainrossi closed 11 months ago

romainrossi commented 12 months ago

I wanted to start an automation when someone touch the NSPanel, waking it up, but I found no easy ways to do so.

The "NSPanel event" entity is the closest to what I want, but the value is a YAML text (i.e "{"page": "screensaver", "component": "currentpage", "value": "pagechange"}") which is complex to parse to select only the wanted event.

I think a simple binary state entity exposing the current state of the NSPanel screen as an on/off state will be the more straightforward solution. Maybe a swith entity can be used, with the additional function of being able to wake-up the NSPanel from Home Assistant ?

I am using Blueprint Version: v.3.4.

edwardtfn commented 12 months ago

I believe this will be easier with v4.0 (not released yet), but even with v3.4 there are some ways of solving this.

Please take a look on how I did by creating a template light: https://github.com/edwardtfn/HomeAssistant-Config/blob/main/packages/areas/hall/hall_panel.yaml#L68

We will get rid of those json sensors on v4.0.