THANK YOU @ALL
Now everything Works Well. THANK YOU
EDIT
i found a problem, i generate with this template for windows
{{ states|selectattr('entity_id', 'in', state_attr('group.open_windows',
'entity_id'))|selectattr('state', 'equalto',
'on')|map(attribute='entity_id')|join(', ')}}
when i check the template there is no entry on the right
here my group
open_windows:
name: windows_open
all: true
icon: mdi:window-closed-variant
entities:
- binary_sensor.fenstersensor_badezimmer
- binary_sensor.fenstersensor_toilette
- binary_sensor.fenstersensor_kinderzimmer
- binary_sensor.fenstersensor_schlafzimmer
- binary_sensor.fenstersensor_wohnzimmer
now are all windows closed, but before the toilette window was open, and when i now check the generated group “group.devices_open_windows” there is the last entery still there. he doesnt delete the entry when the window is closed
here a example (i choose for the picture doors but its the same code above)
here you see he shows me the door is open, but its closed, here must be no entry