Hi,
I’ve bought a Tasmota device to import our gas meter readings into HA, and I’m having troubles setting it up.
It gets autodiscovered in HA, but its sensor and all other attributes show up as unavailable immediately:
The contents of my configuration.yaml file:
homeassistant:
packages: !include_dir_named packages
customize: !include customize.yaml
# Loads default set of integrations. Do not remove.
default_config:
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
template:
- sensor:
- name: "Gasmeter m3"
unique_id: gaszaehler_m3
state: "{{ states ('sensor.tasmota_counter_c1') | float * 0.01 }}"
unit_of_measurement: "m³"
icon: "mdi:gas-station"
device_class: gas
state_class: total_increasing
- sensor:
- name: "Gasmeter kWh"
unique_id: gaszaehler_kwh
state: "{{ (states ('sensor.gaszaehler_m3') | float(0) * 0.9533 * 10.3) | round(0) }}"
unit_of_measurement: "kWh"
icon: "mdi:gas-station"
device_class: energy
state_class: total_increasing
And the contents of my customize.yaml file:
# electricity sensors
sensor.tasmota_power_curr:
device_class: power
unit_of_measurement: 'W'
state_class: measurement
sensor.tasmota_total_in:
device_class: energy
unit_of_measurement: 'kWh'
state_class: total_increasing
# gas sensor
sensor.tasmota_counter_c1:
device_class: gas
unit_of_measurement: 'm3'
state_class: total_increasing
Can anyone help? Thanks in advance!