This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Home Assistant Pyscript to Cleanup "orphaned entertainment areas" in the HUE brigde. | |
# Those are created when powering cycling certain Philips HUE Ambilight TV's. | |
# This script only removes groups where: | |
# - name property is "Entertainment area" (default input value) | |
# - class property is "TV" (default input value) | |
# - Owner property is Null. (hard coded) | |
# - Group type property is "entertainment" (hard coded) | |
# Notes: | |
# - Please review by using the "list groups service" if this filter is selective enough in your setup, | |
# before calling the cleanup script (only needed if you more entertainment area's in use) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Aubess / tuya TS0001 Wall Switches.""" | |
# I bought some Aubess (Tuya TS0001 _TZ3000_46t1rvdu) devices on Ali | |
# The signature is recognized as a Tuya TS0001 device with power metering support, but it doesn report any values. | |
# This custom quirk makes it a simple switch device with the option to configure the power on behavior | |
from zigpy.profiles import zgp, zha | |
from zigpy.zcl.clusters.general import ( | |
Basic, | |
GreenPowerProxy, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""tuya TS000F Wall Switches.""" | |
# This quirk scales both the current and summation readout, and it changes the device from a light into a switch | |
# Note: this quirk is similar to the offical TS000x quirks, except that this device has quite a different signature. | |
# That includes a unknown cluster ID 0x1888 that I filtered out. | |
from zigpy.profiles import zgp, zha | |
from zigpy.zcl.clusters.general import ( | |
Basic, | |
GreenPowerProxy, | |
Groups, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# All credits how to use websockets to retrieve the lovelace configuration goes to https://github.com/qui3xote: | |
# https://github.com/custom-components/pyscript/discussions/272#discussioncomment-1709728 | |
# This example adds a service that itteratively looks-up all custom:datetime-card based cards in a particular dashboard (where optionally a specific view can be specified) | |
# There it evaluates all entities if they exceed the max time configured in that card and then send a notification for them | |
# | |
# Note this latest version will itterate through all embedded cards (ie vertical stacks, confditional etc) | |
# | |
# MIT license by Eric Kreuwels | |
import json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# AutoShutdown.sh (c)2022, MIT license, by Eric Kreuwels | |
# USAGE: AutoShutdown [test|echo] | |
# | |
# Shutdown TrueNas systems when idle for a defined timeout period (default 1800 seconds), | |
# Active during a configurable monitoring timeframe (default between 01:00:00 to 06:30:00). | |
# Run "AutoShutdown test" to just evaluate the idle checks | |
# Run "AutoShutdown echo" to echo to stdout instead of the log file | |
# For normal operation add a "post init script" in truenas: bash /<path>/AutoShutdown.sh& | |
# Idle is defined as: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author Eric Kreuwels, Copyright 2022, publiced under the free MIT license conditions | |
blueprint: | |
name: Actions at Sunset Offset | |
description: Persistant offset based actions around sunset. These actions can be any sequence including checking additional conditions if you like | |
domain: automation | |
input: | |
time_shift: | |
name: Time Shift | |
description: Using time shift around Sunrise. A negative value is earlier, a positive value is later. | |
default: "-00:01:00" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author Eric Kreuwels, Copyright 2022, publiced under the free MIT license conditions | |
blueprint: | |
name: Actions at Sunrise Offset | |
description: Persistant offset based actions around sunrise. These actions can be any sequence including checking additional conditions if you like | |
domain: automation | |
input: | |
time_shift: | |
name: Time Shift | |
description: Using time shift around Sunrise. A negative value is earlier, a positive value is later. | |
default: "-00:01:00" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author Eric Kreuwels, Copyright 2022, publiced under the free MIT license conditions | |
blueprint: | |
name: Actions at Sunset elevation | |
description: Persistant elevation based actions around sunset. These actions can be any sequence including checking additional conditions if you like | |
domain: automation | |
input: | |
elevation_shift: | |
name: Elevation Shift | |
description: Using an elevation angle of the sun relative to the horizon; a positive angle is above the horizon. Angles between 0 and -3 degrees are in the twilight zone | |
default: 0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author Eric Kreuwels, Copyright 2022, publiced under the free MIT license conditions | |
blueprint: | |
name: Actions at Sunrise elevation | |
description: Persistant elevation based actions around sunrise. These actions can be any sequence including checking additional conditions if you like | |
domain: automation | |
input: | |
elevation_shift: | |
name: Elevation Shift | |
description: Using an elevation angle of the sun relative to the horizon; a positive angle is above the horizon. Angles between 0 and -3 degrees are in the twilight zone | |
default: 0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
# Author Eric Kreuwels, Copyright 2022, publices under the free MIT license conditions | |
# This blueprint was inspired by: | |
# https://community.home-assistant.io/t/zha-ikea-symfonisk-sound-controller-for-media-the-spinny-one/266130 | |
# This version requires to recreate your automations that are based on the version above (new options and therefor not compatible) | |
# Changes compared to the one that inspired me: | |
# moved from raw ZHA events to ZHA Symfonisk Device events (raw event attributes changed to often to keep it working) | |
# added configuration inputs for changing the volume delay and number of volume steps | |
# added option to either pause (default) or mute for single press action | |
# restricted the player selection to entities only |