Sorry for the late reaction, but normal life came in between… But I still have not managed to get this working.
To keep it simple I tried your example with simply the entity for ‘window is open’ however, I did not see the the buttons grayed-out and the shutter-card buttons remain working in both positions; Window Open (on) and Closed (off).
type: custom:shutter-card
title: Screen wk Bert
entities:
- entity: cover.screen_4
name: Werkkamer Bert (4)
buttons_position: left
title_position: top
card_mod:
style: |
.sc-shutter-buttons {
{% if is_state('binary_sensor.raam_sensor_werkkamer_b_1_contact', 'on') %}
pointer-events: none;
color: var(--disabled-color);
{% endif %}
}
And in the Template Editor all conditions are working:
4) - Test raam wk-Bert open/dicht
{% if is_state('binary_sensor.raam_sensor_werkkamer_b_1_contact', 'on') %}
Ja, het raam is open
{% else %}
Nee, het raam is gesloten
{% endif %}
===============
5) Test Lux waarde
Zonsterkte is momenteel: {{ states('sensor.outside_luminance_front_illuminance_lux') }} lux.
{% if states('sensor.outside_luminance_front_illuminance_lux')|float(default=0) < 3500 %}
Zonsterkte is hoger dan: {{ zonsterkte }} lux.
{% else %}
Zonsterkte is lager dan: {{ zonsterkte }} lux.
{% endif %}
==================
6)
{% if states('is_sun_above_horizon') %}
1 - Ja, de zon is boven de horizon
{% else %}
2 - Nee, de zon is onder
{% endif %}
7)
# {{ states('sensor.openweathermap_temperature') | int > 20 }}
{% if states('sensor.openweathermap_temperature') | int > 20 %}
1 - De temperatuur is BOVEN de 20 graden Celcius
{% else %}
2 - De temperatuur is LAGER dan 20 graden Celcius
{% endif %}
These template sensors are working perfectly looking at the results in the Template Editor.
(To be honest, it is the first time I used the Template Editor; have still a lot to learn from Jinja2.)
BTW, I even tried ChatGPT in the hope that might give me some help with this. It was a very interesting session, but it good not help me; it apologized for that
Use Home Assistant Lovelace ShutterCard to open and close sunscreens with the following conditions in the ShutterCard:
Hopefully you have still some suggestions…