#trying to make my first blueprint

1 messages · Page 1 of 1 (latest)

winged tartan
#

hey all, C/C++ dev wading into my first HA blueprint, getting an error

"Message malformed: extra keys not allowed @ data['repeat']"

on this code:

blueprint:
name: Cool Room When in AC
description: Opens vents if AC is running and the room is warmer than the thermostat.
domain: automation
input:
target_vent:
name: Vent Controller
description: Vent to be controlled.
selector:
entity:
domain: cover
device_class: damper
multiple: true
temperature_sensor:
name: Temperature Sensor
description: Temperature sensor that dictates state of vent.
selector:
entity:
domain: sensor
device_class: temperature
repeat:
for_each:
- !input target_vent
sequence:
trigger:
- platform: numeric_state
entity_id: !input temperature_sensor
above: sensor.ecobee_temperature
condition:
- condition: and
conditions:
- condition: device
device_id: device_id(repeat.item)
domain: cover
entity_id: repeat.item
type: is_position
below: 100
- condition: and
conditions:
- condition: device
device_id: x
domain: climate
entity_id: climate.ecobee
type: is_hvac_mode
hvac_mode: cool
action:
- device_id: device_id(repeat.item)
domain: cover
entity_id: repeat.item
type: set_position
position: 100
mode: single

flat talon
#
blueprint:
    name: Cool Room When in AC
    description: Opens vents if AC is running and the room is warmer than the thermostat.
    domain: automation
    input:
        target_vent:
            name: Vent Controller
            description: Vent to be controlled.
            selector:
                entity:
                    domain: cover
                    device_class: damper
                    multiple: true
        temperature_sensor:
            name: Temperature Sensor
            description: Temperature sensor that dictates state of vent.
            selector:
                entity:
                    domain: sensor
                    device_class: temperature
repeat:
    for_each:
      - !input target_vent
    sequence:
        trigger:
          - platform: numeric_state
            entity_id: !input temperature_sensor
            above: sensor.ecobee_temperature
        condition:
          - condition: and
            conditions:
              - condition: device
                device_id: device_id(repeat.item)
                domain: cover
                entity_id: repeat.item
                type: is_position
                below: 100
              - condition: and
                conditions:
                  - condition: device
                    device_id: x
                    domain: climate
                    entity_id: climate.ecobee
                    type: is_hvac_mode
                    hvac_mode: cool
        action:
          - device_id: device_id(repeat.item)
            domain: cover
            entity_id: repeat.item
            type: set_position
            position: 100
mode: single
#

This server prefers code be loaded from a link, but if you are doing code here, 3 grave accents and the key word like yaml or json on a line, then the code, then a line with 3 more closing grave accents is the syntax to display stuff.
Generally more that 15 lines is frowned on here, though. It's not re-directed in the threads, but...

#

Then, the BP, there is no trigger statement.

#

Read the pins for more general BP writing help.

#

@winged tartan

winged tartan
#

ack, will read this over, ty kind sir!