#Is it possible to have Home Assistant show whether the window is folded ?
1 messages ยท Page 1 of 1 (latest)
As long as you have a sensor that can tell HA that, yes
Yeah, I have a sensor that shows me whether the window is open or closed. But I don't see whether the window is tilted.
Probably with 2 sensors one top and one bottom if top is not connected but bottom is =folded
Woahhhh, that's really a good idea, thanks a lot๐ฅน ๐ฅน
@silver kestrel Do you happen to have any idea how to display this well in the home assistant app and in the web version? So on the dashboard.
Make a template sensor that combines the information from both e.g.
If top and bottom open:
Open
Else if top open:
Folded
Else:
Closed
I can't find the place where I can create this
In helpers, make a template binary sensor
Yeah, but I can only select one device there. But then I have 2 devices
select what?
{% set bottom_sensor = states("binary_sensor.sensor2") | bool(false) %}
{% if top_sensor and bottom_sensor %}
open
{% elif top_sensor %}
folded
{% else %}
closed
{% endif %}```
You could use an Aqara vibration sensor that does tilt detection.
Currently I am using the aqara door/window sensors
I tested it, it doesn't work. It says closed permanently
you need to change the sensor names to whatever your sensors are called
I changed it, but it doesn't work
ok, well this is assuming they return true when the window is opened, you'd have to reverse the logic if they behave differently
ah - has to be a normal template sensor not a binary template sensor, as you have 3 states you want to output not 2
you also don't want to copy in the dashes at the start and end, that's just for discord formatting
But with the normal sensor there are only weird things to select, not really what I need.
@harsh oak But it works now, thanks๐๐๐
Now I just have to get it to display as a window
you mean for device class etc? you can ignore that
ah yeah, fixing the icon in your card now is separate fun ๐
Can you tell me how to do it?๐
If you have mushroom cards: use a template card and you can make it return an icon based on a template
with just standard home assistant cards - i would make separate entity cards for your window that have a fixed icon on and use condition cards to hide/show them appropriately
something like this:
but probably then shove all of them in a vertical stack so they always show up in the same place
depends how you want things to look of course!
Yeah, I have mushroom cards.
I have already used this to make the icon of my fan rotate when it is on.