Skip to content

Instantly share code, notes, and snippets.

View adwuk's full-sized avatar

Andrew Wallace adwuk

View GitHub Profile
@adwuk
adwuk / heating.py
Last active November 13, 2022 21:09
Multi-zone heating and hot water control using Home Assistant pyscript custom component
# declarations
import datetime
from collections import defaultdict
thermostat_states = defaultdict(dict)
thermostat_triggers = []
# globals - alter to suit
heating_switch = "switch.boiler_room_boiler_switch_1"
heating_schedule = "schedule.central_heating_schedule"
heating_override = "input_boolean.central_heating_override"
@adwuk
adwuk / entities_state_not.yaml
Created October 20, 2022 14:48
Home assistant blueprint: Sync the states of two groups of entities so that Group 1 != Group 2
blueprint:
name: Entity State Not
description: Sync the states of two groups of entities so that Group 1 != Group 2
domain: automation
input:
group1:
name: Entity Group 1
selector:
entity:
multiple: true