HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
custom-components
pyscript
Python2020–2024
custom-components / pyscript

pyscript

Pyscript adds rich Python scripting to HASS

5Distinct people
7Mentions
0Explicit recommenders
1.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Pyscript adds rich Python scripting to HASS

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 6:01:08 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year7 dated mentions

Observed mentions: 2020-11-23 16:38:40 UTC to 2024-01-14 14:24:53 UTC.

0122020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC202
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC101
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC202
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101

What Hacker News says

2 sources
If you are expecting auto discovery of state variables or service calls then that would be nice, but that seems like a bit too much to ask. And it's not something that I personally feel is necessary as you're likely already are familiar enough with the home assistant states/services that you want to interact with by checking them out in the home assistant developer UI. My PyCharm just shows those types as unknown, not as errors. I get auto completion & type checking for all the code I write myself. It's also important to note that PyScript isn't regular python. Instead it's an interpreted script[1] that is compatible with the Python syntax. This is unfortunate, but enables most of the magic of PyScript which otherwise would not be practical. [1] https://github.com/custom-components/pyscript/blob/master/cu...
In I wrote my own smart home software
Pyscript adds rich Python scripting to HASS : https://github.com/custom-components/pyscript An example script: @state_trigger("security.rear_motion == '1' or security.side_motion == '1'") @time_active("range(sunset - 20min, sunrise + 20min)") def motion_light_rear(): """Turn on rear light for 5 minutes when there is motion and it's dark""" task.unique("motion_light_rear") log.info(f"triggered; turning on the light") if light.outside_rear != "on": light.turn_on(entity_id="light.outside_rear", brightness=255) task.sleep(300) light.turn_off(entity_id="light.outside_rear") It's what made me ditch node red after going down the same path.
In I wrote my own smart home software

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.