I'm asking for help - platform: pulse_counter, - platform: dallas_temp

I’m asking for help - platform: pulse_counter, - platform: dallas_temp

esphome:
  name: esphome-web-0000
  friendly_name: Счетчик Туалет(Гор),(Хол)
  min_version: 2025.9.0
  name_add_mac_suffix: false

esp8266:
  board: nodemcuv2


wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

# Enable Home Assistant API
api:
# Блок для ввода фактических значений показаний из интерфейса HA
  services:
    
    - service: set_cold_water_total
      variables:
        new_total: float
      then:
        - lambda: |-
            id(saved_total_cold_water_consumption) = new_total;
            ESP_LOGD("custom", "Set total filter water consumption to: %f", id(saved_total_cold_water_consumption));

    - service: set_hot_water_total
      variables:
        new_total: float
      then:
        - lambda: |-
            id(saved_total_hot_water_consumption) = new_total;
            ESP_LOGD("custom", "Set total filter water consumption to: %f", id(saved_total_hot_water_consumption));   

ota:
  - platform: esphome


# Логирование
logger:
   
# Глобальные переменные для хранения количества литров
globals:
  
  - id: saved_total_hot_water_consumption
    type: float
    restore_value: True
    initial_value: '0.0'

  - id: saved_total_cold_water_consumption
    type: float
    restore_value: True
    initial_value: '0.0'  

# Настройка для счетчика фильтрованой воды
sensor:
  

# Настройка для счетчика горячей воды
  - platform: pulse_counter
    pin:
      number: GPIO12   # Пин счетчика горячей воды
      mode:
        input: true
        pullup: true
    id: cold_water_meter  # ID счетчика горячей воды
    name: "Горячая вода"
    unit_of_measurement: "pulses"
    accuracy_decimals: 1
    filters:
      - multiply: 0.037 # Для счетчика  коэффициент не применяю, т.к. 1 импульс у него равен 1 литру.
      - lambda: |-
          id(saved_total_hot_water_consumption) += x;
          return id(saved_total_hot_water_consumption);

# Настройка для счетчика холодной воды воды
  - platform: pulse_counter
    pin:
      number: GPIO14   # Пин счетчика холодной воды
      mode:
        input: true
        pullup: true
    id: hot_water_meter  # ID счетчика холодной воды
    name: "Холодная вода"
    unit_of_measurement: "pulses"
    accuracy_decimals: 1
    filters:
      - multiply: 0.037 # Для счетчика  коэффициент не применяю, т.к. 1 импульс у него равен 1 литру.
      - lambda: |-
          id(saved_total_cold_water_consumption) += x;
          return id(saved_total_cold_water_consumption);

# Выводим значения глобальных переменных в HA
  
  - platform: template
    name: "Холодная вода всего"
    device_class: water
    state_class: TOTAL_INCREASING
    lambda: |-
      return id(saved_total_cold_water_consumption);
    unit_of_measurement: "L"
    accuracy_decimals: 1

  - platform: template
    name: "Горячая вода всего"
    device_class: water
    state_class: TOTAL_INCREASING
    lambda: |-
      return id(saved_total_hot_water_consumption);
    unit_of_measurement: "L"
    accuracy_decimals: 1  


one_wire:
  - platform: gpio
    pin: GPIO2
sensor
  - platform: dallas_temp
    address: 0xdb00000020354928
    name: Холодная
  - platform: dallas_temp
    address: 0x5e0316a279a40d28
    name: Горячая

I can’t load the config, swears at errors
, the essence of the config is that the water meter is connected directly to the temperature sensors

The water meter counts correctly, the controller sees the temperature sensors in scan mode, but it does not assign sensor addresses.

[14:17:45.471][C][logger:261]: Logger:
[14:17:45.471][C][logger:261]: Max Level: DEBUG
[14:17:45.471][C][logger:261]: Initial Level: DEBUG
[14:17:45.471][C][logger:267]: Log Baud Rate: 115200
[14:17:45.471][C][logger:267]: Hardware UART: UART0
[14:17:45.471][C][gpio.one_wire:021]: GPIO 1-wire bus:
[14:17:45.471][C][gpio.one_wire:022]: Pin: GPIO2
[14:17:45.471][C][gpio.one_wire:084]: Found devices:
[14:17:45.471][C][gpio.one_wire:086]: 0xf30000001c698a28 (DS18B20)
[14:17:45.471][C][gpio.one_wire:086]: 0x6d000000203f9328 (DS18B20)
[14:17:45.471][C][template.sensor:017]: Template Sensor ‘Холодная вода всего’
[14:17:45.471][C][template.sensor:017]: State Class: ‘total_increasing’
[14:17:45.471][C][template.sensor:017]: Unit of Measurement: ‘L’
[14:17:45.471][C][template.sensor:017]: Accuracy Decimals: 1
[14:17:45.472][C][template.sensor:027]: Device Class: ‘water’
[14:17:45.472][C][template.sensor:363]: Update Interval: 60.0s
[14:17:45.500][C][template.sensor:017]: Template Sensor ‘Горячая вода всего’
[14:17:45.500][C][template.sensor:017]: State Class: ‘total_increasing’
[14:17:45.500][C][template.sensor:017]: Unit of Measurement: ‘L’
[14:17:45.500][C][template.sensor:017]: Accuracy Decimals: 1
[14:17:45.506][C][template.sensor:027]: Device Class: ‘water’
[14:17:45.506][C][template.sensor:363]: Update Interval: 60.0s
[14:17:45.523][C][pulse_counter:017]: Pulse Counter ‘Горячая вода’
[14:17:45.523][C][pulse_counter:017]: State Class: ‘measurement’
[14:17:45.523][C][pulse_counter:017]: Unit of Measurement: ‘pulses’
[14:17:45.523][C][pulse_counter:017]: Accuracy Decimals: 1
[14:17:45.534][C][pulse_counter:031]: Icon: ‘mdi:pulse’
[14:17:45.534][C][pulse_counter:172]: Pin: GPIO12
[14:17:45.545][C][pulse_counter:173]: Rising Edge: INCREMENT
[14:17:45.545][C][pulse_counter:173]: Falling Edge: DISABLE
[14:17:45.545][C][pulse_counter:173]: Filtering pulses shorter than 13 µs
[14:17:45.546][C][pulse_counter:363]: Update Interval: 60.0s
[14:17:45.569][C][pulse_counter:017]: Pulse Counter ‘Холодная вода’
[14:17:45.569][C][pulse_counter:017]: State Class: ‘measurement’
[14:17:45.569][C][pulse_counter:017]: Unit of Measurement: ‘pulses’
[14:17:45.569][C][pulse_counter:017]: Accuracy Decimals: 1
[14:17:45.578][C][pulse_counter:031]: Icon: ‘mdi:pulse’
[14:17:45.578][C][pulse_counter:172]: Pin: GPIO14
[14:17:45.578][C][pulse_counter:173]: Rising Edge: INCREMENT
[14:17:45.578][C][pulse_counter:173]: Falling Edge: DISABLE
[14:17:45.578][C][pulse_counter:173]: Filtering pulses shorter than 13 µs
[14:17:45.581][C][pulse_counter:363]: Update Interval: 60.0s
[14:17:45.595][C][wifi:1062]: WiFi:
[14:17:45.595][C][wifi:1062]: Connected: YES
[14:17:45.595][C][wifi:827]: Local MAC: E8:9F:6D:88:A4:74
[14:17:45.606][C][wifi:834]: IP Address: 192.168.1.111
[14:17:45.619][C][wifi:838]: SSID: [redacted]
[14:17:45.619][C][wifi:838]: BSSID: [redacted]
[14:17:45.619][C][wifi:838]: Hostname: ‘esphome-web-0000’
[14:17:45.619][C][wifi:838]: Signal strength: -48 dB ▂▄▆█
[14:17:45.619][C][wifi:838]: Channel: 10
[14:17:45.619][C][wifi:838]: Subnet: 255.255.255.0
[14:17:45.619][C][wifi:838]: Gateway: 192.168.1.1
[14:17:45.619][C][wifi:838]: DNS1: 192.168.1.1
[14:17:45.619][C][wifi:838]: DNS2: 0.0.0.0
[14:17:45.629][C][esphome.ota:093]: Over-The-Air updates:
[14:17:45.629][C][esphome.ota:093]: Address: esphome-web-0000.local:8266
[14:17:45.629][C][esphome.ota:093]: Version: 2
[14:17:45.638][C][safe_mode:018]: Safe Mode:
[14:17:45.638][C][safe_mode:018]: Successful after: 60s
[14:17:45.638][C][safe_mode:018]: Invoke after: 10 attempts
[14:17:45.638][C][safe_mode:018]: Duration: 300s
[14:17:45.651][C][api:223]: Server:
[14:17:45.651][C][api:223]: Address: esphome-web-0000.local:6053
[14:17:45.651][C][api:223]: Listen backlog: 1
[14:17:45.651][C][api:223]: Max connections: 4
[14:17:45.660][C][api:235]: Noise encryption: NO
[14:17:45.667][C][mdns:177]: mDNS:
[14:17:45.667][C][mdns:177]: Hostname: esphome-web-0000

https://community.home-assistant.io/t/how-to-help-us-help-you-or-how-to-ask-a-good-question/114371#oneone-format-it-properly-16

Not your code, neither your logs present dallas_temp component.
If you want support here, read the post above and edit your OP using code tags.

This is my first time creating a theme, I can’t figure out how to create it correctly.

Like this:

when I prescribe a tire scan, she sees the sensors

I don’t.
I only see one_wire, not dallas_temp.

f6be36681e0da431418ec7781fb6c62712941803

Uploading: 2025-11-26_16-32-02.png…
Uploading: 2025-11-26_16-32-30.png…

esphome:
  name: esphome-web-0000
  friendly_name: Счетчик Туалет(Гор),(Хол)
  min_version: 2025.9.0
  name_add_mac_suffix: false

esp8266:
  board: nodemcuv2


wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

# Enable Home Assistant API
api:
# Блок для ввода фактических значений показаний из интерфейса HA
  services:
    
    - service: set_cold_water_total
      variables:
        new_total: float
      then:
        - lambda: |-
            id(saved_total_cold_water_consumption) = new_total;
            ESP_LOGD("custom", "Set total filter water consumption to: %f", id(saved_total_cold_water_consumption));

    - service: set_hot_water_total
      variables:
        new_total: float
      then:
        - lambda: |-
            id(saved_total_hot_water_consumption) = new_total;
            ESP_LOGD("custom", "Set total filter water consumption to: %f", id(saved_total_hot_water_consumption));   

ota:
  - platform: esphome


# Логирование
logger:
   
# Глобальные переменные для хранения количества литров
globals:
  
  - id: saved_total_hot_water_consumption
    type: float
    restore_value: True
    initial_value: '0.0'

  - id: saved_total_cold_water_consumption
    type: float
    restore_value: True
    initial_value: '0.0'  

# Настройка для счетчика фильтрованой воды
sensor:
  

# Настройка для счетчика горячей воды
  - platform: pulse_counter
    pin:
      number: GPIO12   # Пин счетчика горячей воды
      mode:
        input: true
        pullup: true
    id: cold_water_meter  # ID счетчика горячей воды
    name: "Горячая вода"
    unit_of_measurement: "pulses"
    accuracy_decimals: 1
    filters:
      - multiply: 0.037 # Для счетчика  коэффициент не применяю, т.к. 1 импульс у него равен 1 литру.
      - lambda: |-
          id(saved_total_hot_water_consumption) += x;
          return id(saved_total_hot_water_consumption);

# Настройка для счетчика холодной воды воды
  - platform: pulse_counter
    pin:
      number: GPIO14   # Пин счетчика холодной воды
      mode:
        input: true
        pullup: true
    id: hot_water_meter  # ID счетчика холодной воды
    name: "Холодная вода"
    unit_of_measurement: "pulses"
    accuracy_decimals: 1
    filters:
      - multiply: 0.037 # Для счетчика  коэффициент не применяю, т.к. 1 импульс у него равен 1 литру.
      - lambda: |-
          id(saved_total_cold_water_consumption) += x;
          return id(saved_total_cold_water_consumption);

# Выводим значения глобальных переменных в HA
  
  - platform: template
    name: "Холодная вода всего"
    device_class: water
    state_class: TOTAL_INCREASING
    lambda: |-
      return id(saved_total_cold_water_consumption);
    unit_of_measurement: "L"
    accuracy_decimals: 1

  - platform: template
    name: "Горячая вода всего"
    device_class: water
    state_class: TOTAL_INCREASING
    lambda: |-
      return id(saved_total_hot_water_consumption);
    unit_of_measurement: "L"
    accuracy_decimals: 1  


one_wire:
  - platform: gpio
    pin: GPIO2
sensor:
  - platform: dallas_temp
    address: 0xdb00000020354928
    name: Холодная
  - platform: dallas_temp
    address: 0x5e0316a279a40d28
    name: Горячая

The “sensor” is duplicated, but it doesn’t work without it.

Remove this line:

Then correct the addresses on your dallas_temp sensors.

Default update interval is 60s, you might want to adjust that as well.

one_wire:
  - platform: gpio
    pin: GPIO2
sensor:
  - platform: dallas_temp
    address: 0xf30000001c698a28
    name: Холодная
    update_interval: 10s
  - platform: dallas_temp
    address: 0x6d000000203f9328
    name: Горячая
    update_interval: 10s
1 Like