Wątek archiwalny - Komponent wM-Bus do ESPHome (SzczepanLeon) starsze wersje do 1.5.1 włącznie

@pepeEL Kod ESP (Update: 2023-01-26):

esphome:
  name: apator
  comment: Maszynownia - licznik wody

esp8266:
  board: nodemcuv2

external_components:
  - source: github://SzczepanLeon/esphome-components@main
    components: [ wmbus ]

# Enable logging
logger: 
  level: DEBUG

# Enable Home Assistant API
api:
  encryption:
    key: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

ota:
  password: "XXXXXXXXXXXXXXXXXXXXXXX"

# Serwer with a statistic data and OTA board update
web_server:
  port: 80
  version: 2
  auth:
    username: !secret maszynownia_auth_u
    password: !secret maszynownia_auth_p

# WiFi Local Area Network (HA)
wifi:
  networks:
  - ssid: !secret piwnica_wifi_ssid
    password: !secret piwnica_wifi_p
  - ssid: !secret parter_wifi_ssid
    password: !secret parter_wifi_p
  manual_ip:
    static_ip: 192.168.X.X
    gateway: 192.168.X.X
    subnet: 255.255.255.0
  ap:
    ssid: "Apator AP"
    password: !secret maszynownia_ap_p

time:
  platform: sntp

captive_portal:

# int ApatorID = 0x4829838;  to numer wodomierza z naklejki na nim

wmbus:
  mosi_pin: GPIO13
  miso_pin: GPIO12
  clk_pin:  GPIO14
  cs_pin:   GPIO2
  gdo0_pin: GPIO5
  gdo2_pin: GPIO4

sensor:
  - platform: wmbus
    name: "Wodomierz"
    meter_id: 0x4829838 
    type: apator162
    key: "00000000000000000000000000000000"
  - platform: uptime
    name: "Uptime Wodomierz"

  - platform: wifi_signal # Reports the WiFi signal strength/RSSI in dB
    name: "WiFi signal"
    id: wifi_signal_db
    update_interval: 60s
    entity_category: "diagnostic"

  - platform: copy # Reports the WiFi signal strength in %
    source_id: wifi_signal_db
    name: "WiFi signal %"
    filters:
      - lambda: return min(max(2 * (x + 100.0), 0.0), 100.0);
    unit_of_measurement: "%"
    entity_category: "diagnostic"

text_sensor:
  - platform: wifi_info
    ip_address:
      name: "IP"
    ssid:
      name: "SSID"
    mac_address:
      name: "MAC"

tak to aktualnie wygląda (po update do 2022.12.7) :