Skip to content

Instantly share code, notes, and snippets.

@mdegat01
mdegat01 / auto_check_config.yaml
Created June 21, 2022 15:31
Auto Check Config package
automation:
id: cb7d0e035b94403db6b08f7263584b51_config_check_update
alias: Run config check on change
description: Run a config check when config is changed and reload automations when blueprints change
max_exceeded: silent
trigger:
- id: file_change
platform: event
event_type: folder_watcher
- id: reload
@mdegat01
mdegat01 / template.yaml
Created June 12, 2022 22:50
Presence Lights Controllers
# Presence lights controllers - On on wake up, off on asleep or leave, override based on manual changes to lights
- trigger:
- id: home_change__bedroom
platform: state
entity_id: binary_sensor.awake_at_home
from: ['on', 'off']
to: ['on', 'off']
- id: sleep_change__bedroom
platform: state
entity_id: binary_sensor.person_is_asleep_in_bedroom
@mdegat01
mdegat01 / update_notifications.yaml
Last active May 7, 2024 10:42
Update Notifications Automation Blueprint
blueprint:
name: Update notifications
description: Send notifications for new updates and install or skip on action
homeassistant:
min_version: '2022.4.0'
domain: automation
input:
update_entities:
name: Update entities
description: >-
@mdegat01
mdegat01 / bright_lights.yaml
Created March 17, 2022 00:52
IDs as variables
template:
binary_sensor:
- trigger:
- id: bedroom__
platform: state
entity_id:
- sensor.bedroom_illuminance_lux_stats
- sensor.bedroom_light_sensor_illuminance_lux
- binary_sensor.daytime
- binary_sensor.fallback_bright_inside
@mdegat01
mdegat01 / install_all_requirements_error.txt
Created February 19, 2022 03:14
Error when running "Install all requirements" task
Running setup.py install for uamqp ... error
ERROR: Command errored out with exit status 1:
command: /usr/local/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-u756m4v5/uamqp/setup.py'"'"'; __file__='"'"'/tmp/pip-install-u756m4v5/uamqp/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-of2xdiqa/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/uamqp
cwd: /tmp/pip-install-u756m4v5/uamqp/
Complete output (81 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-aarch64-3.9
@mdegat01
mdegat01 / org.freedesktop.resolve1.xml
Created February 17, 2022 17:26
DBus interface for systemd-resolved service
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.freedesktop.DBus.Peer">
<method name="Ping"/>
<method name="GetMachineId">
<arg type="s" name="machine_uuid" direction="out"/>
</method>
</interface>
<interface name="org.freedesktop.DBus.Introspectable">
@mdegat01
mdegat01 / YT_DL_flow.json
Last active December 26, 2021 07:30
Flow to download youtube video
[
{
"id": "8e4aba9fe8f50732",
"type": "tab",
"label": "DL YT",
"disabled": false,
"info": "",
"env": []
},
{
@mdegat01
mdegat01 / pip_requirements_install_error.txt
Created December 23, 2021 13:45
Error when running `pip3 install -r requirements_test_all.txt -c homeassistant/package_constraints.txt`
ERROR: Cannot install -r requirements_test_all.txt (line 10), -r requirements_test_all.txt (line 128), -r requirements_test_all.txt (line 131), -r requirements_test_all.txt (line 165), -r requirements_test_all.txt (line 168), -r requirements_test_all.txt (line 171), -r requirements_test_all.txt (line 210), -r requirements_test_all.txt (line 222), -r requirements_test_all.txt (line 243), -r requirements_test_all.txt (line 27), -r requirements_test_all.txt (line 394), -r requirements_test_all.txt (line 415), -r requirements_test_all.txt (line 459), -r requirements_test_all.txt (line 492), -r requirements_test_all.txt (line 501) and -r requirements_test_all.txt (line 61) because these package versions have conflicting dependencies.
The conflict is caused by:
adax-local 0.1.1 depends on async-timeout>=1.4.0
pyrmvtransport 0.3.3 depends on async-timeout>=4.0.0
adax 0.2.0 depends on async-timeout>=3.0.0
aioguardian 2021.11.0 depends on async_timeout<5.0.0 and >=3.0.1
aioharmony 0.2.8 depends on
@mdegat01
mdegat01 / get_env_value_subflow.json
Created December 16, 2021 16:36
Get env value subflow
[
{
"id": "75c36e89506227cf",
"type": "subflow",
"name": "Get env value",
"info": "Gets the value provided for an env variable.\nIf value is prefixed with `$:` then renders it\nas a JSONata expression. Otherwise value returned\nas is.",
"category": "",
"in": [
{
"x": 40,