Hi all! I’m trying to set up a telegram integration to select scenes for different rooms.
Returning the list of scenes does not go super smoothly yet.
I want them in an inline keyboard, so they will each need to be structured like Friendly Name:/apply_scene scene_id
I can manage to either prefix them with the command:
{{
scenes
| map('regex_replace', '^' , '/apply_scene ')
| list
}}
Replace the id’s with the friendly name:
{{
scenes
| map('state_attr', 'friendly_name')
| list
}}
Or duplicate the id:
{{
scenes
| map('regex_replace', '(.*)', '\\1 \\1')
| list
}}
But I haven’t found a way to have both. Any tips?
Doing this with a loop gives weird results, the telegram add-on does better with lists.
Thanks!