Skip to content

Instantly share code, notes, and snippets.

@dougrathbone
Last active June 28, 2022 09:19
Show Gist options
  • Save dougrathbone/050625d850b4800acd4e276a888fdc4d to your computer and use it in GitHub Desktop.
Save dougrathbone/050625d850b4800acd4e276a888fdc4d to your computer and use it in GitHub Desktop.
blueprint:
name: Heating Control for Floor heating (CBUS relay)
description: Control your heating with options for person home, if the times are right.
domain: automation
input:
heating:
name: Floor switch device
description: The climate device to use.
selector:
entity:
domain: light
temp_sensor:
name: Temperature Sensor
description: Temperature Sensor to check.
selector:
entity:
domain: sensor
device_class: temperature
person1:
name: Person 1
description: The first person that needs to be home.
default: []
selector:
entity:
domain: person
person2:
name: Person 2
description: The second person that needs to be home.
default: []
selector:
entity:
domain: person
min_temp:
name: Minimum Temp
description: If temperature is below this value and someone is home, It turns heating on.
default: 15
selector:
number:
min: 15
max: 25
step: 1
mode: slider
time_after:
name: Time After
description: After this time the heating turns on, so it's warm in the morning
default: '07:30:00'
selector:
time:
time_before:
name: Time Before
description: After this time the heating turns off, This to prevent the heating is on in the middle of the night
default: '21:30:00'
selector:
time:
trigger:
- platform: homeassistant
event: start
- platform: event
event_type: automation_reloaded
- platform: time_pattern
minutes: /10
action:
- choose:
- conditions:
- condition: numeric_state
entity_id: !input 'temp_sensor'
below: !input min_temp
- condition: time
before: !input 'time_before'
after: !input 'time_after'
- condition: or
conditions:
- condition: state
entity_id: !input 'person1'
state: home
- condition: state
entity_id: !input 'person2'
state: home
sequence:
- service: light.turn_on
data:
entity_id: !input 'heating'
default:
- service: light.turn_off
data:
entity_id: !input 'heating'
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment