captive_portal: # esp8266 pin configuration entry one_wire: - platform: gpio pin: GPIO02 globals: - id: water_impulses type: int restore_value: true # if set to false, the value will be 0 at reboot initial_value: '1873' binary_sensor: - platform: gpio id: solenoid pin: number: GPIO18 mode: INPUT_PULLUP inverted: true - platform: gpio id: water_impulse internal: true pin: number: GPIO4 mode: INPUT_PULLUP inverted: true filters: - delayed_off: 0.10 s on_press: then: - lambda: id(water_impulses) += 1; - platform: gpio name: Rain Detected id: rain_detected pin: number: GPIO22 inverted: True mode: INPUT_PULLUP filters: - delayed_on_off: 1s - platform: gpio name: Tank Low id: tank_low pin: number: GPIO21 inverted: True mode: INPUT_PULLUP filters: - delayed_on_off: 1s sensor: - platform: pulse_meter name: "Irrigation Water Used" id: pulse_irrigation_water_meter unit_of_measurement: 'm³/min' internal_filter: 0.10 s timeout: 2 min state_class: measurement device_class: water icon: mdi:meter-water #accuracy_decimals: 2 pin: number: GPIO5 mode: INPUT_PULLUP inverted: true filters: # 1 imp / 0.1 m³ = 10 imp / m³ (in my case); water_imp_value = 10; - lambda: return x * (1.0 / 100); - platform: template name: "Irrigation Consumption Total" id: garden_irrigation_consumption_total unit_of_measurement: 'm³' icon: mdi:meter-water-outline state_class: total_increasing device_class: water accuracy_decimals: 2 lambda: return id(water_impulses) * (1.0 / 100); update_interval: 10 s - platform: dallas_temp address: 0x1f0000005f45af28 name: "Pump Monitoring Temperature"