iot-root / garden-of-eden

Truly own that which is yours!
GNU General Public License v3.0
22 stars 6 forks source link

homeassistant #2

Open iot-root opened 11 months ago

iot-root commented 11 months ago

Add Home Assistant compatibility

description: Schedule for Gardyn light control
trigger:
  - platform: time
    at: "06:00:00"
  - platform: time
    at: "09:00:00"
  - platform: time
    at: "17:00:00"
  - platform: time
    at: "20:00:00"
action:
  - choose:
      - conditions:
          - condition: template
            value_template: "{{ trigger.now.strftime('%H:%M:%S') in ['06:00:00', '17:00:00'] }}"
        sequence:
          - service: light.turn_on
            entity_id: light.gardyn_light
            data:
              brightness_pct: 50
      - conditions:
          - condition: template
            value_template: "{{ trigger.now.strftime('%H:%M:%S') == '09:00:00' }}"
        sequence:
          - service: light.turn_on
            entity_id: light.gardyn_light
            data:
              brightness_pct: 70
      - conditions:
          - condition: template
            value_template: "{{ trigger.now.strftime('%H:%M:%S') == '20:00:00' }}"
        sequence:
          - service: light.turn_off
            entity_id: light.gardyn_light
mode: single
alias: Gardyn Pump
description: Schedule for Gardyn pump control
trigger:
  - platform: time
    at: "09:30:00"
  - platform: time
    at: "09:35:00"
  - platform: time
    at: "16:00:00"
  - platform: time
    at: "16:05:00"
  - platform: time
    at: "21:00:00"
  - platform: time
    at: "21:05:00"
action:
  - choose:
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.now.strftime('%H:%M:%S') in ['09:30:00', '16:00:00',
              '21:00:00'] }}
        sequence:
          - service: light.turn_on
            entity_id: light.gardyn_pump
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.now.strftime('%H:%M:%S') in ['09:35:00', '16:05:00',
              '21:05:00'] }}
        sequence:
          - service: light.turn_off
            entity_id: light.gardyn_pump
mode: single
iot-root commented 2 months ago

dashboard yaml

title: Home
views:
  - title: Gardyn
    path: gardyn
    icon: mdi:flower-tulip-outline
    badges: []
    cards:
      - type: horizontal-stack
        cards:
          - graph: line
            type: sensor
            entity: sensor.gardyn_temperature
            detail: 1
          - type: sensor
            entity: sensor.gardyn_humidity
            graph: line
          - type: gauge
            entity: sensor.gardyn_water_level
            name: 'Water Level '
            unit: cm
            severity:
              green: 6
              yellow: 9
              red: 11
            min: 6
            max: 12
            needle: true
      - type: light
        entity: light.gardyn_light
      - type: light
        entity: light.gardyn_pump
        icon: mdi:water-pump
      - type: entities
        entities:
          - entity: sensor.gardyn_humidity
            name: Humidity
          - entity: sensor.gardyn_pcb_temperature
            name: PCB Temperature
          - entity: sensor.gardyn_temperature
            name: Temperature
          - entity: sensor.gardyn_water_level
            name: Water Level
        title: gardyn
      - chart_type: line
        period: hour
        type: statistics-graph
        entities:
          - sensor.gardyn_temperature
        stat_types:
          - mean
          - min
          - max
      - chart_type: line
        period: hour
        type: statistics-graph
        entities:
          - sensor.gardyn_water_level
        stat_types:
          - mean
          - min
          - max
      - chart_type: line
        period: hour
        type: statistics-graph
        entities:
          - sensor.gardyn_humidity
        stat_types:
          - mean
          - min
          - max
      - chart_type: line
        period: hour
        type: statistics-graph
        entities:
          - sensor.gardyn_pcb_temperature
        stat_types:
          - mean
          - min
          - max