Skip to content

Instantly share code, notes, and snippets.

@chaptergy
Created March 26, 2024 20:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chaptergy/f48c99cd4acd25b251a8326acb72f455 to your computer and use it in GitHub Desktop.
Save chaptergy/f48c99cd4acd25b251a8326acb72f455 to your computer and use it in GitHub Desktop.
blueprint:
name: Better Thermostat Automatic Temperature
description: Set BT Thermostats temperature based on a schedule and presence.
domain: automation
source_url: https://gist.github.com/chaptergy/f48c99cd4acd25b251a8326acb72f455
input:
thermostat_target:
name: Thermostats
selector:
target:
device:
integration: better_thermostat
entity:
integration: better_thermostat
domain: climate
eco_temp:
name: Eco Temperature
description: The temperature when it should not be heated
default: 17
selector:
number:
min: 5
max: 35
unit_of_measurement: °C
schedule:
name: Schedule Helper
selector:
entity:
domain: schedule
presence:
name: Presence
selector:
entity:
domain:
- person
- group
mode: restart
trigger:
- platform: state
entity_id:
- !input presence
- !input schedule
from:
to:
condition: []
action:
- if:
- condition: and
conditions:
- condition: state
entity_id: !input presence
state: "home"
- condition: state
entity_id: !input schedule
state: "on"
then:
- service: better_thermostat.restore_saved_target_temperature
data: {}
target: !input thermostat_target
else:
- service: better_thermostat.set_temp_target_temperature
data:
temperature: !input eco_temp
target: !input thermostat_target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment