pyscript icon indicating copy to clipboard operation
pyscript copied to clipboard

Pyscript adds rich Python scripting to HASS

Results 151 pyscript issues
Sort by recently updated
recently updated
newest added

After restarting home assistant, I'm getting the following exception when it tries to load one of my scripts that use the generated stubs: ``` Exception in line 25: @state_trigger(get_str_expr(sensor.basement_staircase_smoke_co_alarm_battery_level)) ^...

The function `service.call()` is not generated in `pyscript_builtins.py`. This likely conflicts with the `@service` decorator, so I'm not sure how it would be handled. There are some cases where I...

Looking into #787 I found that `Enum` overrides `__dir__`, so [dir(inst)](https://github.com/custom-components/pyscript/compare/master...dmamelin:pyscript:evalfuncvar-descriptor-binding?expand=1#diff-733b200d9ce0361a3582c281043fd548b057e971f927f73aed75bfdc8422f06cL1992) inside `call_func` doesn’t show the method. I went deep into MRO, inspect, etc., but the actual fix turned out...

Hi, I'm trying to use the Enum as it's introduced in the latest release but instance methods are not working as usual. pyscript version: 1.7.0 HA version: 2025.12.2, home assistant...

after update to 2025.12.0 template functions doesn't work. What version of Home Assistant Core has the issue? 2025.12.0 What was the last working version of Home Assistant Core? last core...

Explanation: Before this PR, all imported modules were always assigned `auto_start = True`, which caused their triggers to run immediately after the file was loaded: load files from disk →...

Module-level triggers start before Home Assistant reaches the RUNNING state modules/module.py: ```python @time_trigger def module_startup(): log.info(f"Module hass state: {hass.state}") ``` test.py: ```python from module import module_startup @time_trigger def file_startup(): log.info(f"File...

I have the folowing (simplyfied) pyscript code: ``` def state_trigger_factory(sensor_name): @state_trigger(sensor_name) def func_trig(value=None, var_name=None): log.info(f"func_trig: {var_name} is changed: {value}") return func_trig f2 = state_trigger_factory("sensor.time") ``` which is giving the nice...

With the `@task_unique(name)` decorator, the task name is set to `['']` instead of `name`. `task.unique(name)` sets the name correctly which means that mixing the two behaves unexpectedly. Test code: ```...

I've used pyscript (no YAML) for all my automation/scripts/trigger/etc and it rocks. However I'm struggling with how to do Actionable Notification. Consider this syntax that I've come across in this...