Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic user names on dss_google_voice_v2.0 #5

Open
luci-11 opened this issue Apr 1, 2022 · 0 comments
Open

Dynamic user names on dss_google_voice_v2.0 #5

luci-11 opened this issue Apr 1, 2022 · 0 comments

Comments

@luci-11
Copy link

luci-11 commented Apr 1, 2022

Hi,
I cannot open pull request but I think it could be useful to have dynamic strings instead of hard coded names in "DSS VOICE Benvenuto userX" automations .
When using person as dss_dispositivi_user1 (for example) you can use the following message code:

      - service: input_boolean.turn_off
        entity_id: input_boolean.dss_voice_user1_appena_entrato
      - service: script.dss_voice_riproduci_messaggio
        data_template:
          message: >-
            {% set user = state_attr('group.dss_dispositivi_user1', 'entity_id')[0] %}
            {% set nome = state_attr(user, 'friendly_name') %}
            {{ [
            "Bentornato "+ nome+"... " ,
            "Ciao "+ nome +"... " 
            ] | random }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant