Keresés

Új hozzászólás Aktív témák

  • noorbertt

    őstag

    válasz itanczos #30412 üzenetére

    Máshogyan kéne? Esphome oldalon lévő shelly 1 és a 1l konfig keveréke

    [ Szerkesztve ]

  • noorbertt

    őstag

    válasz itanczos #30412 üzenetére

    Koszonom a Shelly-s otletet! :)

    Mukodik minden ahogyan kell.
    - ket fizikai kapcsolo
    - bluetooth taviranyito
    - ha alatt

    annyi az egesz hogy a okos lampa fixre van kotve es a shelly sw 1-2 binary sensornak van megadva.
    + ha tul meleg a keszulek, akkor jelez nekem
    ++ ha elmegy az aram es ujra bootol a shelly, akkor a lampa kikapcsol

    konfig ilyen lett:

    substitutions:
      plug_name: shelly-nappali-lampa
      device_name: shelly-nappali-lampa
      
    esphome:
      name: shelly-nappali-lampa
      platform: ESP8266
      board: esp01_1m
      on_boot:
        priority: -100.0
        then:
          - delay: 10s
          - if:
              condition:
                - api.connected:
              then:
                  - homeassistant.service:
                      service: light.turn_off
                      data:
                        entity_id: light.nappali_led
    logger:
    api:
    ota:

    wifi:
      ssid: !secret wifi_ssid
      password: !secret wifi_password
      ap:
        ssid: "Shelly-Nappali-Lampa"

    captive_portal:
    #==============================================================

    # Text sensors with general information.
    text_sensor:
      - platform: wifi_info
        ip_address:
          name: ${device_name} IP
    # Sensors with general information.
    sensor:
      # Uptime sensor.
      - platform: uptime
        name: ${device_name} Uptime
      # WiFi Signal sensor.
      - platform: wifi_signal
        name: ${device_name} WiFi Signal
        update_interval: 60s
      #Shelly 1L hot safe
      - platform: ntc
        sensor: temp_resistance_reading
        name: ${device_name}_temperature
        unit_of_measurement: "°C"
        accuracy_decimals: 1
        icon: "mdi:thermometer"
        calibration:
          b_constant: 3350
          reference_resistance: 10kOhm
          reference_temperature: 298.15K
        on_value_range:
          - above: "70.0"
            then:
              - homeassistant.service:
                  service: notify.mobile_app_norbert_s_pixel_3a
                  data:
                    title: Shelly Nappali!
                    message: Too hot!! Do something!!
      - platform: resistance
        id: temp_resistance_reading
        sensor: temp_analog_reading
        configuration: DOWNSTREAM
        resistor: 32kOhm
      - platform: adc
        id: temp_analog_reading
        pin: A0

    binary_sensor:
      - platform: gpio
        name: ${device_name} Input
        pin:
          number: GPIO4
        # small delay to prevent debouncing
        filters:
          - delayed_on_off: 50ms
        # config for state change of input button
        on_state:
            then:
              - if:
                  condition:
                    and:
                      - wifi.connected:
                      - api.connected:
                  # toggle smart light if wifi and api are connected and relay is on
                  then:
                    - homeassistant.service:
                        service: light.toggle
                        data:
                          entity_id: light.nappali_led
        id: button
      - platform: gpio
        name: ${device_name} Input 2
        pin:
          number: GPIO14
        # small delay to prevent debouncing
        filters:
          - delayed_on_off: 50ms
        # config for state change of input button
        on_state:
            then:
              - if:
                  condition:
                    and:
                      - wifi.connected:
                      - api.connected:
                  # toggle smart light if wifi and api are connected and relay is on
                  then:
                    - homeassistant.service:
                        service: light.toggle
                        data:
                          entity_id: light.nappali_led
        id: button_2
    status_led:
      pin: GPIO0

Új hozzászólás Aktív témák