Files
Home-AssistantConfig/config/packages/space.yaml
Carlo Costanzo 7464db41f4 Enhance Home Assistant configuration with new sensors, state classes, and infrastructure monitoring
- Updated proxmox.yaml to include state_class for disk usage sensors and improved availability checks.
- Modified space.yaml to add state_class for the Earth distance sensor.
- Enhanced stats.yaml with state_class for various command line sensors and template sensors to support long-term trend rollups.
- Updated recorder.yaml to refine notes and exclude additional MariaDB snapshot sensors from recording.
- Revised README.md in scripts to correct package paths and add a new monthly log hygiene review automation.
- Introduced infrastructure.yaml for comprehensive observability and monitoring of WAN, DNS, and website states, including automated repairs for uptime breaches.
- Added mariadb_snapshot.py script to collect telemetry snapshots for MariaDB, supporting Home Assistant command line sensors.
2026-04-22 17:38:17 -04:00

51 lines
1.8 KiB
YAML
Executable File

######################################################################
# @CCOSTAN - Follow Me on X
# For more info visit https://www.vcloudinfo.com/click-here
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# -------------------------------------------------------------------
# Space - ISS and launch-related telemetry
# Tracks SpaceX timing and announces an upcoming launch window.
# -------------------------------------------------------------------
# Notes: Guard template triggers against unavailable startup sensor state.
######################################################################
sensor:
- platform: rest
scan_interval: 1800
name: SpaceX Starman
json_attributes:
- earth_distance_mi
value_template: '{{ value_json["speed_mph"] }}'
unit_of_measurement: "mph"
state_class: measurement
resource: 'https://api.spacexdata.com/v2/info/roadster'
- platform: rest
scan_interval: 1800
name: SpaceX
json_attributes:
- mission_name
- launch_site
- rocket
value_template: '{{ value_json["launch_date_unix"] }}'
resource: 'https://api.spacexdata.com/v2/launches/next'
automation:
- alias: Launch Window Approaching
id: 1d42fc4f-a37d-4283-b64b-09242a145598
trigger:
- platform: template
value_template: >-
{% set launch_ts = states('sensor.spacex') | int(0) %}
{% set seconds_until = launch_ts - (now().timestamp() | int) %}
{{ launch_ts > 0 and seconds_until > 0 and seconds_until <= 600 }}
action:
- service: script.notify_engine
data:
value1: >-
{% set mission = state_attr('sensor.spacex', 'mission_name') | default('A SpaceX launch', true) %}
Go outside. {{ mission }} is scheduled to launch in about 10 minutes.
group: 'information'