Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESPHOME #9

Open
Johnnyyr opened this issue Jan 2, 2022 · 2 comments
Open

ESPHOME #9

Johnnyyr opened this issue Jan 2, 2022 · 2 comments

Comments

@Johnnyyr
Copy link

Johnnyyr commented Jan 2, 2022

Hi mein Reed zählt etwas eigenartig und unreglmässig wie kann ich das kalibrieren auf mein Zähler steht 1 Impuls = 0,1 m3 ich habe deinen Code auf folgendes geändert sollte doch passen?

`sensor:

  • platform: pulse_counter
    pin:
    number: GPIO5
    mode: INPUT_PULLUP
    name: "Gasverbrauch"
    update_interval : 10s
    filters:
    • lambda: |-
      static float total_value = 0.0;
      total_value += x * 0.1;
      return total_value;
      unit_of_measurement: "m³"
      accuracy_decimals: 1
      icon: 'mdi:fire'`
@ha-es13
Copy link

ha-es13 commented Jan 18, 2022

Das gleiche bei mir. Wäre schön, wenn es hier ein Lösungsvorschlag gibt.

@Swiftrail84
Copy link

Swiftrail84 commented May 13, 2022

Hey. Habt ihr eine Lösung gefunden. Mein Reed Kontakt funktioniert zwar grundsätzlich, ich habe ihn getestet, von der Gasuhr nimmt er sich aber nichts an.

esphome:
  name: nodemcu-esp8266-gas

esp8266:
  board: nodemcuv2

globals:
  - id: total_pulses
    type: int
    restore_value: false
    initial_value: '0'  # hier kann der Gaszählerstand initialisiert werden

binary_sensor:
  - platform: gpio
    id: internal_pulse_counter
    pin:
      number: GPIO5
      mode: INPUT_PULLUP
    name: "Live-Impuls"
    filters:
      - delayed_on: 10ms
    on_press:
      then:
        - lambda: id(total_pulses) += 1;

sensor:
  - platform: template
    name: "Gasverbrauch"
    device_class: gas
    unit_of_measurement: "m³"
    state_class: "total_increasing"
    icon: "mdi:gas-burner"
    accuracy_decimals: 2
    lambda: |-
      return id(total_pulses) * 0.01;

  - platform: wifi_signal
    name: "WiFi Signal Sensor"
    update_interval: 60s

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
  password: "6878b7ced6dc8d"

wifi:
  ssid: !secret privatewifi_ssid
  password: !secret privatewifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Nodemcu-Esp8266-Gas"
    password: "byuemnxiig"

captive_portal:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants