Skip to content

Instantly share code, notes, and snippets.

@WizBangCrash
WizBangCrash / climate-control.yaml
Last active February 24, 2024 11:50
Climate control using calendar and home presence
#
# Climate control
#
# Use a local calendar and a prescense sensor to optimise a thermostat climate control
#
# The automation uses calendar events to control the setpoint of the thermostat.
# Each calendar event summary field contains either a numeric temperature value or
# a present name as the last word in the summary field.
# The thermostat will then be set to the appropiate setpoint when the claendar events
# start and end. If no events are present then the setpoint will be the "home" preset.
@WizBangCrash
WizBangCrash / gist:7534af489e9da0a33d8bbcc31a2ab268
Created October 19, 2023 07:58
M5StickC Plus configuration for use with Home Assistant voice
substitutions:
name: m5stickc-plus-esp32-ac918c
friendly_name: M5StickC Plus ESP32 ac918c
# packages:
# m5stack.atom-echo-voice-assistant: github://esphome/firmware/voice-assistant/m5stack-atom-echo.yaml@main
esphome:
name: ${name}
name_add_mac_suffix: false
friendly_name: ${friendly_name}
project:
@WizBangCrash
WizBangCrash / light-switch-with-occupancy-philips.yaml
Created June 30, 2021 07:55
Home Assistant Blueprint: Philips Dimmer Switch + Occupancy Sensor
blueprint:
name: Philips Dimmer Switch + Occupancy Sensor
description: >
Single press On turns on the light(s) for 60mins & enables occupancy killswitch.
Single press Off turns off the light(s) & disables occupancy killswitch.
Light(s) can be dimmed via up/down buttons.
Occupancy detection turns on/off light(s) if killswitch disabled.
Changing light state with HomeKit has same effect as switch.
domain: automation
input:
@WizBangCrash
WizBangCrash / media-room-light-control.yaml
Created June 30, 2021 07:41
Control the a set of main lights and a set of ambient lights based on the state of the TV, the room occupancy and the illumination levels
#
# Determine what to do with the lounge lights based on TV, illumination,
# occupancy and the light switch
#
#
blueprint:
name: Media Room Lighting Control
description: >
Control the a set of main lights and a set of ambient lights
based on the state of the TV, the room occupancy and the illumination levels
@WizBangCrash
WizBangCrash / zha-configure-philips-sml001.yaml
Created June 30, 2021 07:34
Sets the Occupied to Unoccupied delay and sensitivity of the Philips SML001 Zigbee sensor
blueprint:
name: Configure SML001 Zigbee Attributes on startup
description: |
Sets the Occupied to Unoccupied delay and sensitivity of the Philips
SML001 Zigbee sensor
domain: automation
input:
# occupancy_entity_id:
# name: Occupancy Sensor
# description: "The occupancy sensor to use for this automation"
@WizBangCrash
WizBangCrash / occupancy-response-sml001.yaml
Created April 20, 2021 20:54
Occupancy Blueprint for Philips Hue SML001 motion sensor
#
# Blueprint to control a light (or lights) using a Philips Hue SML001
# motion sensor connected to Home Assistant via ZHA
#
# Home Assitant configures the sensor to be an Occupancy Sensor at boot,
# setting the Occupied to Unoccipied time and sensitivity of the sensor.
# I used to use HA timers to do this, but Blueprint is now much more simple :-)
#
# Additionally the sensor can be disabled using a oneof two entities.
# I usually link this to a TV state, as I do not want my lights going on & off
@WizBangCrash
WizBangCrash / Dockerfile
Created May 25, 2020 13:49
Visual Studio Code Remote Container Setup for RavenSystem HAA
#-------------------------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------
# To fully customize the contents of this image, use the following Dockerfile instead:
# https://github.com/microsoft/vscode-dev-containers/tree/v0.112.0/containers/javascript-node-12/.devcontainer/Dockerfile
FROM malachib/esp-open-rtos
# The image referenced above includes a non-root user with sudo access. Add