Madelena / esphome-weatherman-dashboard

A simple dashboard with weather and NYC subway information for ESPHome
https://community.home-assistant.io/t/use-esphome-with-e-ink-displays-to-blend-in-with-your-home-decor
983 stars 50 forks source link

Duplicate key "else" #14

Closed filikun closed 1 year ago

filikun commented 1 year ago

While validating I get this with your weatherman.yaml

INFO Reading configuration /config/esphome/weatherman.yaml...
ERROR Error while reading config: Invalid YAML syntax:

Duplicate key "else"
  in "/config/esphome/e-ink-display.yaml", line 61, column 15:
                  else:
                  ^
NOTE: Previous declaration here:
  in "/config/esphome/e-ink-display.yaml", line 59, column 15:
                  else:
                  ^
filikun commented 1 year ago

I guess it should look something like this?

time:
  - platform: homeassistant
    id: homeassistant_time
    on_time:
      - seconds: 0
        minutes: /1
        then:
          - if:
              condition:
                lambda: 'return id(data_updated) == true;'
              then:
                - lambda: 'id(initial_data_received) = true;'
                - if:
                    condition:
                      binary_sensor.is_on: motion_detected
                    then:
                      - logger.log: "Sensor data updated and activity in home detected: Refreshing display..."
                      - component.update: eink_display
                      - lambda: 'id(data_updated) = false;'
                    else:
                        - logger.log: "Sensor data updated but no activity in home - skipping display refresh."
              else:
                - logger.log: "No sensors updated - skipping display refresh."
paviro commented 1 year ago

Should probably be fixed in #15 or at least it builds for me.

Madelena commented 1 year ago

Yep, should be fixed in #15