Can anyone tell me how to read the value of a hass-variable from within a python_script? I’m not talking about a regular script (with jinja expansion.) There is a service available to set the values, but it doesn’t seem like I can get the current value in any normal way. Would appreciate some help…
I’m currently trying a direct call to hass.states.get, but it’s not giving me something that works.
lock = hass.states.get(“variable.” + str(lock_entity))
The variable is a “boolean” taking on only True or False. The get I’ve shown never seems to return anything - not sure if it returns the “state” or the “value”.
Thanks in advance