I am using a similar telegram message about open windows, when I leave home (working well).
This one aims on making sure that my Tasmota lights are connected.
service: telegram_bot.send_message
data:
message: >
{% set w = expand('light.bambuslicht') | selectattr('state', 'eq',
'unavailable') | map(attribute='name') | list %} {{ 'ACHTUNG!\nDie folgenden
Lichter sind offline:\n' if w | count > 1 else 'ACHTUNG!\nDas folgende Licht
ist offline:\n'}}{{ w | join('\n') }}
However, it does not return the unavailable lights - it works with states like on and off though
But unavailable is the exact state I can also see in the developers tools
Any suggestion?
EDIT:
It seems, that the state unavailable is somehow not propagated to the group
Means: With single lights in state unavailable this very light is returned.
But even though the group’s state is unavailable, too, its members (also unavailable) are not returned.
Thank you for your help.
And sorry for the delay, but I did not get a notification about your post.
This is a different lamp (tasmota), but the same story:
The Burolicht (office light) is a group of two lights (Burolicht_l for left and …_r for right).