xannor / hass_py_set_state

Home Assistant Python Script to force set an entity state
The Unlicense
44 stars 14 forks source link

Error executing script: name 'inputState' is not defined #7

Open PavelD opened 2 years ago

PavelD commented 2 years ago

When allow_create: true and don't specify the state in the data list the script execution ends with following error:

[homeassistant.components.python_script.set_state.py] Error executing script: name 'inputState' is not defined

The state is not required even though is expected in the script itself.

It can be prefill with some default value on the same place as inputAttributesObject for newly created sensors is prepared.