Files
Home-AssistantConfig/config/packages/lightning.yaml
Carlo Costanzo c464073a0d Standardizing on Headers for all YAML files.
- Updated comments in various YAML configuration files to provide clearer descriptions of functionalities and integrations.
- Improved documentation for alarm, alexa_media_player, backups, blink, cbyge, climate, finance, fridge, garadget, glances, hass_agent_homepc, holiday, ios, landscape_lighting, lightning, logger, medicine, nfc_tags, noonhome, office_motion, phynplus, powerwall, printer, processmonitor, proxmox, rachio, rheem_econet, roku, sleepiq, space, speedtest, stats, superbowl, vacuum, wireless, and youtube packages.
- Added relevant links and issue references where applicable to enhance user guidance and support.
2025-11-29 13:17:07 -05:00

66 lines
2.3 KiB
YAML
Executable File

#-------------------------------------------
# @CCOSTAN
# Original Repo : https://github.com/CCOSTAN/Home-AssistantConfig
# Lightning Alerts - Monitor nearby strikes and notify.
#-------------------------------------------
######################################################################
## Lightning sensor integration and alerting.
######################################################################
# Guide: https://www.vcloudinfo.com/2020/08/adding-a-lightning-sensor-to-home-assistant.html | Issue #392
input_boolean:
snooze_lightning:
name: Snooze Lightning
initial: off
icon: mdi:weather-lightning
automation:
- alias: Snooze Lightning
id: 1f295bb8-8925-4b22-8f75-9l1ghtn1nga8
trigger:
platform: event
event_type: mobile_app_notification_action
event_data:
action: SNOOZE_LIGHTNING
action:
- service: input_boolean.turn_on
entity_id: input_boolean.snooze_lightning
- alias: 'Lightning Notification'
id: 6e054688-5e75-48bd-9411-52a3e26264d1
mode: single
trigger:
- platform: state
entity_id: sensor.blitzortung_lightning_counter
condition:
- condition: state
entity_id: group.family
state: 'home'
- condition: numeric_state
entity_id: sensor.blitzortung_lightning_counter
above: 0
- condition: state
entity_id: input_boolean.snooze_lightning
state: 'off'
action:
- service: script.notify_engine_two_button
data:
title: 'Lightning Warning!'
value1: "Lightning has been detected within {{(states('sensor.blitzortung_lightning_distance') | int / 1.609) | round (1, 'floor')}} Miles of our home. Be careful if outdoors."
title1: 'Snooze Alerts until tomorrow'
action1: 'SNOOZE_LIGHTNING'
icon1: 'sfsymbols:arrow.up.circle'
who: "Family"
group: 'Information'
- service: script.speech_engine
data:
value1: "Lightning has been detected within {{(states('sensor.blitzortung_lightning_distance') | int / 1.609) | round (1, 'floor')}} Miles of our home. Please make sure everyone is inside the house."
call_window_check: 1
call_garage_check: 1
- delay:
minutes: 60