Skip to content

Instantly share code, notes, and snippets.

View yuri-vashchenko's full-sized avatar

Yuri Vashchenko yuri-vashchenko

View GitHub Profile
@yuri-vashchenko
yuri-vashchenko / reset_wled_if_unavailable.yaml
Last active January 21, 2024 07:10
Reset WLED if unavailable
blueprint:
name: Reset WLED if unavailable
source_url: https://gist.github.com/yuri-vashchenko/4caac2ec589da09d4a8a5ce732831779
description: "Resets a WLED if it becomes unavailable by pusting a message to its\n
IP address.\nRequired inputs:\n - wled_entity (Entity ID of WLED to monitor)\n
\ - rest_command (REST command to run to reset WLED. Must have 'ip' parameter)\n
\ - wled_ip (WLED ip address) - Should be saved or hardcoded, because ip sensor
\ for WLED is also unavailable when the whole WLED is unavailable\n \n\nOptional
inputs:\n - Enabling Entity (the automation will execute only when enabling_entity
is in Enabling Entity State)\n - Enabling Entity State (see Enabling Entity
@yuri-vashchenko
yuri-vashchenko / button_light_control.yaml
Last active December 4, 2021 08:13
button_light_control.yaml
blueprint:
name: Control Yeelight 650 with Xiaomi Button
source_url: https://gist.github.com/yuri-vashchenko/bddb24fbafdac3ab5e4dece17a5ce2b5
description: >
Control Yeelight 650 celing light with Xiaomi button:
- Single press: If the night light or main light is on, turns if off, otherwise turns on last active mode (night light or main light)
- Double press: Toggles main/night light; If night light is on, switches it to main light and vice versa.
- Long press: User action. In my case it triggers LED strip on/off.
Required inputs:
@yuri-vashchenko
yuri-vashchenko / yandex-station-say.yaml
Created November 26, 2021 10:11
Yandex Station Say
blueprint:
name: yandex station say
description: A script that uses media_player.play_media to send a message to a yandex station
source_url: https://gist.github.com/yuri-vashchenko/5f6970b7d019f5faa7a3e2ef620ac806
domain: script
homeassistant:
min_version: 2021.11.0
input:
speaker_target:
name: Device(s) to speak thru
@yuri-vashchenko
yuri-vashchenko / google-assistant-say.yaml
Last active November 26, 2021 10:34
HA Blueprint Script for a google-translate-say message. Home Assistant
blueprint:
name: tts.google_say Message_2021-11-20
description: A script that uses tts google say to send a message to a google speaker
source_url: https://gist.github.com/yuri-vashchenko/3e6e29d1d3076040e50c1ea7164bfb48
domain: script
homeassistant:
min_version: 2021.11.0
input:
speaker_target:
name: Device(s) to speak thru
@yuri-vashchenko
yuri-vashchenko / low-battery-level-detection-notification-for-all-battery-sensors.yaml Home Assistant Blueprint: Low battery level detection & notification for all battery sensors
blueprint:
name: Low battery level detection & notification for all battery sensors
description: Regularly test all sensors with 'battery' device-class for crossing
a certain battery level threshold and if so execute an action.
domain: automation
input:
threshold:
name: Battery warning level threshold
description: Battery sensors below threshold are assumed to be low-battery (as
well as binary battery sensors with value 'on').
@yuri-vashchenko
yuri-vashchenko / button_light_control.yaml
Last active February 23, 2021 02:55
Control Yeelight 650 ceiling light with Xiaomi Wireless Button (MQTT)
blueprint:
name: Control Yeelight 650 with Xiaomi Button
source_url: https://gist.github.com/yuri-vashchenko/de7e477b47b6cf4dd842cd30865eddbb
description: >
Control Yeelight 650 ceiling light with Xiaomi button:
- Single press: If the night light or main light is on, turns if off, otherwise turns on last active mode (night light or main light)
- Double press: Toggles main/night light; If night light is on, switches it to main light and vice versa.
- Long press: User action. In my case it triggers LED strip on/off.
Required inputs:
@yuri-vashchenko
yuri-vashchenko / mqtt_record_event_timestamp.yaml
Last active January 31, 2021 07:24
Home Assistant Blueprint to record timestamp of event
blueprint:
name: Record Event timestamp
source_url: https://gist.github.com/yuri-vashchenko/ec3ee9c008af7b44071aabdf44b51df5
description: >
Publish a message with timestamp to MQTT topic when monitored entity state changes to specifc value or any value
Required inputs:
- Topic (MQTT root topic)
- Trigger Entity (entity to monitor state changes)