Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion devices_schedules_restart_handler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ mode: queued
max_exceeded: silent

variables:
version: 20260222
version: 20260507

triggers:
- trigger: homeassistant
Expand All @@ -80,6 +80,11 @@ triggers:
conditions: []

actions:
- wait_template: "{{ is_state('binary_sensor.pyscript_common_utilities', 'on') }}"
timeout:
seconds: 60
continue_on_timeout: true

- variables:
_index_key: !input registry_index_key
_prefix: !input registry_timer_prefix
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ dev = [
"beautifulsoup4",
"curl-cffi",
"google-api-python-client",
"h2",
"homeassistant>=2026.4.0",
"h2>=4,<5",
"homeassistant>=2026.5.0",
"ruff",
]

Expand Down
9 changes: 9 additions & 0 deletions scripts/common_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,15 @@ async def initialize_cache_db() -> None:
"""Initialize cache and prune expired entries on startup."""
await _cache_prepare_db(force=True)
await _prune_expired()
state.set( # noqa: F821
f"binary_sensor.pyscript_{__name__}",
"on",
{
"friendly_name": f"Pyscript {__name__.replace('_', ' ').title()}",
"device_class": "connectivity",
},
)
log.info(f"Pyscript {__name__} is ready.") # noqa: F821


@time_trigger("cron(0 * * * *)") # noqa: F821
Expand Down