-
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 7 replies
-
Hi. I managed to solve a little bit, but not completely. A little more detail:
Above the bottom sensor is the temperature sensor Example: I made a new sensor #==========================
# Window sensor-Diane
#==========================
- platform: template
sensors:
so_di_st:
friendly_name: "Status-Window Sensor-Di"
value_template: >-
{% if is_state('binary_sensor.so_di', 'on') and is_state('binary_sensor.so_di_1', 'on') %}
open
{% elif is_state('binary_sensor.so_di', 'on') and is_state('binary_sensor.so_di_1', 'off') %}
partially
{% else %}
closed
{% endif %} which shows: In the SVG file I made I created: In fp.yaml I created: ########################################################
# Window state display
########################################################
#******************************
# Windows PICTURE state display
#******************************
- entity: binary_sensor.so_di
element: window.so_di
state_action:
service: floorplan.class_set
service_data:
class: '${(entity.state === "on") ? "open" : "closed"}'
- entity: binary_sensor.so_je
element: window.so_je
state_action:
service: floorplan.class_set
service_data:
class: '${(entity.state === "on") ? "open" : "closed"}'
- entity: binary_sensor.so_ko
element: window.so_ko
state_action:
service: floorplan.class_set
service_data:
class: '${(entity.state === "on") ? "open" : "closed"}'
- entity: sensor.so_ku_st
element: window.so_ku
state_action:
service: floorplan.class_set
service_data:
class: '${(entity.state)}'
- entity: binary_sensor.so_mi
element: window.so_mi
state_action:
service: floorplan.class_set
service_data:
class: '${(entity.state === "on") ? "open" : "closed"}'
- entity: sensor.so_na_st
element: window.so_na
state_action:
service: floorplan.class_set
service_data:
class: '${(entity.state)}'
- entity: sensor.so_sp_st
element: window.so_sp
state_action:
service: floorplan.class_set
service_data:
class: '${(entity.state)}'
tap_action: false
#****************************
# Window STROKE state display
#****************************
- entities:
- binary_sensor.so_je
- binary_sensor.so_ko
- binary_sensor.so_mi
state_action:
service: floorplan.class_set
service_data:
class: '${(entity.state === "on") ? "open" : "closed"}'
tap_action: false
#*********************************************
# Window STROKE state display / partially
#*********************************************
- entities:
- sensor.so_sp_st
- sensor.so_na_st
- sensor.so_di_st
- sensor.so_ku_st
state_action:
service: floorplan.class_set
service_data:
class: '${(entity.state)}'
tap_action: false and in CSS file: /*######################################################
# Window state display
########################################################
#******************************
# Windows PICTURE state display
#*****************************/
#window image {
display: none;
mix-blend-mode: lighten;
animation: 0.75s fade-in linear forwards;
}
@keyframes fade-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
#window image.open {
display: block !important;
opacity: 1;
z-index: 11 !important;
}
/****************************
# Window STROKE state display
#***************************/
#windows .open {
stroke: #fffffd !important;
stroke-width: 10px !important;
opacity: 1 !important;
z-index: 12;
filter: blur(2px);
-o-filter: blur(2px);
-ms-filter: blur(2px);
-moz-filter: blur(2px);
-webkit-filter: blur(2px);
}
/*********************************************
# Window STROKE state display / partially
#********************************************/
#windows .partially {
stroke: #fffffd !important;
stroke-width: 10px !important;
opacity: 1 !important;
z-index: 12;
filter: blur(2px);
-o-filter: blur(2px);
-ms-filter: blur(2px);
-moz-filter: blur(2px);
-webkit-filter: blur(2px);
} #1 The window is closed and shows OK Any idea what I should do?? |
Beta Was this translation helpful? Give feedback.
-
The idea is to show an image |
Beta Was this translation helpful? Give feedback.
-
And finally, it also works for an open window (sensor from the template). - entity: sensor.so_sp_st
element: binary_sensor.so_sp
state_action:
service: floorplan.class_set
service_data:
class: '${(entity.state === "open") ? "open" : "closed"}' |
Beta Was this translation helpful? Give feedback.
-
Once upon a time, a smart man wrote ;=)))) OzGav you are a magic man!!!! Thank you. |
Beta Was this translation helpful? Give feedback.
Yes no where are you checking for the state of
partially_open
in fact I don't see reference tobinary_sensor.so_sp
in your fp.yamlGiven you said this
I would expect something like: