joBr99 / nspanel-issue-graveyard

place to move waiting for content issues to and to keep the search a bit cleaned up
0 stars 0 forks source link

[Help] How to negate a status of entity? #44

Closed JaroslawPrzybyl closed 1 year ago

JaroslawPrzybyl commented 1 year ago

PROBLEM DESCRIPTION

I have an entity (garage door) where its state is indicated by other sensor than switch using for open/close. I did it as follow:

image and generally it works fine, the only problem as I have here is that my sensor is active when door is closed. So my entity icon is highlighted not when door is closed, not opened as expected. How to negate this situation? Is there any way to do it just in apps.yaml, without using external template sensors? I tried as follow:

status: 'ha:{{is_state("binary_sensor.cio_in_1", "off")}}'

but it doesn't work (anyway: why? Template returns correct values: false when sensor state is on and true when off) I'm skipping requested information as not connected to my issue.

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!


- [ ] Provide your apps.yaml:

apps.yaml here: NA

- [ ] Go to Settings>Add-ons>AppDaemon>Log and then, provide the output of the log after restarting the appdaemon container:

Log output here: NA



### ADDITIONAL INFORMATION

_Add information about your setup here, if any. (For example docker version of AppDaemon instead of the HomeAssistant Add-on)_
NA
joBr99 commented 1 year ago

Hey, I would recommend you to use a switch template for this.

https://www.home-assistant.io/integrations/switch.template/

or a cover template

https://www.home-assistant.io/integrations/cover.template/

This is the standard way in homeassistant to combine multiple entities and also allows you to use it in HA UI aswell.