Hi,
I am a developer and new to Home Assistant. I got very excited when I stumbled upon it.
After a few hours of sorting unix, docker, docker desktop issues, I finally got Home Assistant up and running locally on my PC.
I thought I would start with a simple electricity consumption display, with a basic input_number to enter meter readings manually, either daily or monthly.
But sadly… this… is… insanely… complicated
There are sensors, input numbers, sensor templates, utility meters… all either in configuration.yaml or in input_nubers.yaml or other files.
I managed to create the input field to manually enter the meter reading from the Overview page of Home Assistant, but nothing happens. I have 2 sensors showing in the Sensor box: “Daily Energy” and “Monthly Energy”, but when I click on them there is no history.
And this is my configuration.yaml file.
# Loads default set of integrations. Do not remove. default_config: # Text to speech
tts:
- platform: google_translate automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
utility_meter:
monthly_energy:
source: sensor.energy_reading
name: Monthly Energy
cycle: monthly
daily_energy:
source: sensor.energy_reading
name: Daily Energy
cycle: daily
input_number:
electricity_meter_reading:
name: Electricity Meter Reading
initial: 66130
min: 0
max: 999999
step: 1
mode: box
unit_of_measurement: kWh
template:
- sensor:
- name: energy_reading
unit_of_measurement: kWh
device_class: energy
I am getting this error in the logs
Invalid config for [template]: required key not provided @ data['sensor'][0]['state']. Got None. (See /config/configuration.yaml, line 32).
When I click on Energy I get “No matching statistics found” and cannot go any further.
Also no idea how and where to setup a consumption graph (monthly or daily).
Grateful for any pointers on how to do this. I searched the docs and googled but all I found were partial answers that were difficult to piece together to understand the key steps.