Hello,
I am trying to create my first Blueprint. But I have a Problem with one of my conditions, I think .
I used this blueprint as a template to just add my stuff and change it so it works better with my Nest thermostat.
Here is my Blueprint:
blueprint:
name: Thermostat Control
description: Control your thermostat with options for group home, and heating between specific times.
domain: automation
input:
thermastat:
name: Thermastat Device
description: The Thermastat device to use.
selector:
entity:
domain: climate
group_presence:
name: Person Group
description: The group of people that have to be home.
default: []
selector:
entity:
domain: group
group_not_present_offset:
name: Not present offset
description: Set to Eco if Person of Group was not present for a given amount of time
default: 01:00:00
selector:
time: {}
heating_boolean:
name: Heating Boolean
description: Check if Boolean is on for automation
default: true
selector:
entity:
domain: input_boolean
hvac_mode:
name: HVAC Mode
description: Will run only if thermostat is in given HVAC mode.
default: heat
selector:
select:
options:
- heat
- cool
set_temp:
name: Temperature Target
description: Sets the thermostat to this temperature.
default: 20
selector:
number:
min: 10.0
max: 25.0
step: 0.5
mode: slider
eco_temp:
name: Energy Saving Temperature
description: When away, keep the Energy Saving Temperature
default: 17
selector:
number:
min: 14.0
max: 25.0
step: 0.5
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: {}
# source_url: https://gist.github.com/f45tb00t/eab416909ff6d125d7f3c6170ab017a9
variables:
set_temp: !input 'set_temp'
eco_temp: !input 'eco_temp'
hvac_mode: !input 'hvac_mode'
trigger:
- platform: homeassistant
event: start
- platform: event
event_type: automation_reloaded
- platform: time_pattern
minutes: /5
- platform: device
domain: climate
entity_id: !input 'thermastat'
type: hvac_mode_changed
- platform: state
entity_id: !input 'heating_boolean'
to: 'on'
condition:
- condition: state
entity_id: !input 'heating_boolean'
state: 'on'
- condition: device
domain: climate
entity_id: !input 'thermastat'
type: is_hvac_mode
hvac_mode: '{{ hvac_mode }}'
- condition: time
after: !input 'time_after'
before: !input 'time_before'
action:
- choose:
- conditions:
- condition: state
entity_id: !input 'group_presence'
state: not_home
for: !input 'group_not_present_offset'
sequence:
- service: climate.set_temperature
target:
entity_id: !input 'thermastat'
data:
temperature: '{{ eco_temp }}'
default:
- service: climate.set_temperature
target:
entity_id: !input 'thermastat'
data:
temperature: '{{ set_temp }}'
and here is the error I get when I create an automation with this blueprint:
Logger: homeassistant.components.automation
Source: components/automation/init.py:638
Integration: Automation (documentation, issues)
First occurred: 12:00:04 (12 occurrences)
Last logged: 12:24:03
Blueprint Thermostat Control generated invalid automation with inputs OrderedDict(
[(âhvac_modeâ, âheatâ),
(âthermastatâ, âclimate.living_room_thermostatâ),
(âgroup_presenceâ, âgroup.somebodyâ),
(âheating_booleanâ, âinput_boolean.thermostat_autoâ),
(âset_tempâ, 22),
(âeco_tempâ, 18),
(âtime_afterâ, â07:45:00â)]
): required key not provided @ data[âconditionâ][1][âdevice_idâ]. Got None
I think, I need a âdevice_idâ in the condition with the type âdeviceâ but how do I get it from my input?