Skip to content

How to pass a variable to the script? #43

@shelly20222

Description

@shelly20222
Image

I don't know how to give a entity to the script. In my case, it is a IP Adress which I want to block in Fritzbox.

e.g.
fritzblock.py {{ states(‘sensor.zu_sperrende_ip‘) }}

How can I access the variable in script?

e.g.
Import sys Ip = str(sys.argv[1])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions