Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
2.0 kB
1
Indexable
Never
esphome:
  name: regulator-otacok
  platform: ESP8266
  board: d1_mini

# Enable logging
logger:
  level: DEBUG
# Enable Home Assistant API
api:

ota:
  password: "2791bd73d3acf12378e80f4548b1d298"

wifi:
  networks:
  - ssid: "LCnet_Datex"
    password: "nepoviem"
  - ssid: "(:"
    password: "nepoviem"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Regulator-Otacok"
    password: "GETRzJquJbKV"

captive_portal:
output:
  - platform: ac_dimmer
    id: dimmer1
    gate_pin: D7
    method: trailing
    zero_cross_pin:
      number: D6
      mode: INPUT
      inverted: yes

light:
  - platform: monochromatic
    output: dimmer1
    name: regulator otacok
    
dallas:
  - pin: GPIO0
    update_interval: 10s
sensor:
  - platform: dallas
    address: 0x3E3C01F095D46928
    name: "solar_teplota"   
    id: solar
  - platform: homeassistant
    name: "otacky cerpadla"
    entity_id: light.regulator_otacok
    attribute: brightness
    id: otacky
  
  - platform: template
    lambda: 'return id(otacky).state / 2.55;'
    id: otackyp
    
web_server:
  port: 80
switch:
  - platform: gpio
    pin: D5
    name: "zasuvka bazen_1"
  - platform: gpio
    pin: D8
    name: "zasuvka bazen_2"
i2c:
  sda: D2
  scl: D1
  
binary_sensor:
  - platform: gpio
    pin:
      number: GPIO1
      inverted: true
    name: "bazen button 1"
    filters:
      - delayed_on: 10ms
  - platform: gpio
    pin:
      number: GPIO2
      inverted: true
    name: "bazen button 2"
    filters:
      - delayed_on: 10ms
  - platform: gpio
    pin:
      number: GPIO3
      inverted: true
    name: "bazen button 3"
    filters:
      - delayed_on: 10ms

display:
  - platform: lcd_pcf8574
    dimensions: 16x2
    address: 0x27
    lambda: |-
      it.print(0, 0,"Solar:");
      it.printf(6, 0,"%.0fC", id(solar).state);
      it.print(10, 0,"M:");
      it.print(0, 1,"Bazen:");
      it.print(10, 1,"vz:");
      it.printf(11, 0,"%.0f%", id(otackyp).state);