Know the state of tilt and turn Windows/doors

First you talked about the cover template, 3 or 4 times ( like you said) took me 5 minutes too see it was not the right thing for my case.

Now i had an idea ( nothing special , but clever i think) and you say it,s not new? Show me who else have made it like i did and for the same purpose i used it ?

Thats a lot really relly clever things ( much clever then mine )that people have made with zigbee sensors , really out of the box things, but you didnt saw nothing like this.

For all the community: Not saying no one did this , but i bet that @Fallingaway24 don,t ever see and won,t find nothing just like this !

All this talk with you i,m sure now people really think that i think i made something great… well i don,t think that , just wanted to post something simple that could help someone, because like i said , i saw some posts on here for people asking for opinion about how to know the state of tilt Windows…
when i was only searching for good tilt window icons.

Well even just for that ( the icon) i thing this post could help someone.

Idk who took a dump in my cheerios but this post just aggregated me and made me irrational. I think it’s my responsibility to come to terms with the fact that I way overreacted here and took my anger out on you. For that, I apologize. The only thing that matters is you like the results, you learned and you felt generous and wanted to share it. Good job on your project and again, I apologize for being a Di**

3 Likes

It doesn’t work for some images, like ones that need a lot of detail, they’re hard to distinguish. You can also use real images for your icons. It’s just like how you can use a person’s picture for the “peraon.person” entity. Here’s a couple I use. One is a BT beacon for a Keychain, one is an actual washing machine, people’s faces obviously, a Honda Keychain and the colorful one that is hard to make out, that’s actually an image of the default background from an iPhone. For certain entities, I like It way more than the standard mdi thumbnails. Its pretty simple to do if you want the details.

Help me
I bought shelly blue Door/window this has an open closed sensor and a tilt sensor. How can I combine the status of these 2 sensors to ensure that if the tilt sensor is between 1 and 7 degrees the opening sensor shows the tilt and not open status?
binary_sensor.window_bagno_window
sensor.window_bagno_rotation

template:
sensor:

- name: "window state"
state: >
{% if is_state("binary_sensor.window_bagno_window", "aperto") and is_state("sensor.window_bagno_rotation", "0") %}
Aperto
{% elif is_state("binary_sensor.window_bagno_window", "aperto") and is_state("sensor.window_bagno_rotation", "from 1 to 7") %}
Vasistas 
{% elif is_state("binary_sensor.window_bagno_window", "chiuso") and is_state("sensor.window_bagno_rotation", "0") %}
Chiusa
{% endif %}
icon: >
{% if is_state("binary_sensor.window_bagno_window", "aperto") and is_state("sensor.window_bagno_rotation", "0") %}
mdi:window-open-variant
{% elif is_state("binary_sensor.window_bagno_window", "aperto") and is_state("sensor.window_bagno_rotation", "from 1 to 7") %}
mdi:angle-acute
{% elif is_state("binary_sensor.window_bagno_window", "chiuso") and is_state("sensor.window_bagno_rotation", "0") %}
mdi:window-closed-variant
{% endif %}

Ora sto provando questo ma non funziona ancora

sensor:
- platform: template
  sensors:
    finestra_pranzo:
      friendly_name: "Finestra_pranzo"
      value_template: 
        {{ if  state_attr('binary_sensor.window_pranzo_window')'on'}} 
          Aperta
        {{ elif state_attr('binary_sensor.window_pranzo_window')'off' }} 
          Chiusa
        {{ elif state_attr('binary_sensor.window_pranzo_window')'on' and state_attr('sensor.window_pranzo_rotation')|int <= 7) }} 
          Vasistas
      icon_template: mdi:window-closed-variant