2021.9.0: More energy, USB discovery, template ❤️

Since the change of the state_class to total_increasing my sensors got messed up and the data collected in my energy board for the last 3 days is wrong. How can I reset all the long term statistic data to start fresh with the energy counters? Where is this stuff stored?

I have some Plugs that do create correct entities for Energy Monitoring (running Tasmota).
So I don’t manually define the sensors … but if it helps …

The resulting entity looks like this:
image

I assume many have already asked for the energy view to include EV charging in the energy distribution animated diagram?

Id say if the EV is just plugged into the house, it should be considered under monitoring another ‘individual device’ ? No different to sending energy to a hot water heater or running a fridge.
However if the EV was configured to feed back into the Grid, then it would be like a second battery? And that would be a good addition to the animated diagram in my opinion.

Hi.
I’m still on Hassos 2021.8.8 (3B+).
I just run the upgrade check and I got this error:

Testing configuration at /tmp/config
Fatal error while loading config: [Errno 2] No such file or directory: ‘/usr/local/lib/python3.9/site-packages/idna-3.2.dist-info/METADATA’
Failed config
General Errors:
- [Errno 2] No such file or directory: ‘/usr/local/lib/python3.9/site-packages/idna-3.2.dist-info/METADATA’

Any tip on what should I check (and fix)?

1 Like

I’m seeing this error message as well with the configuration check. I will hold off on installing for now.

Yes but I was thinking an official version of one of these and more visible than the individual devices at the bottom but maybe that only makes sense for “live data”
image

I ended up with this solution → How adapt a custom mqtt reading gas sensor to use with new dashboard - #2 by AnthonyPluth which worked for me…
But I still had issues with

state_class: measurement total_increasing

But that was before my (rooted) Toon slimme meter was fixed…Toon:Adapted to new energy dashboard code

Were you able to resolve this? - getting the same on 2021.9.1

Rolled back to 2021.8.8 and all is good again

I rolled back to 2021.8.8

@IgnatiusA

Hello, I see petro helped you out getting it in the right place under sensor: in the config yaml.

I would of expected to see device_class: energy and unit_of_measurement: kWh in the attributes for your sensor.energy_washingmachine_kwh

Since you edited the yaml and rebooted, has the washing machine used any power yet ?

1 Like

I tryed to update HASSIO from 2021.8.8 to 2021.9.1. Then supervisor could not start. It was not upagraded, still in 2021.8.8, but getting errors:

2021-09-03 10:56:06 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration openmediavault which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-09-03 10:56:06 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration saver which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-09-03 10:56:06 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-09-03 10:56:06 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration smartir which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-09-03 10:56:11 WARNING (MainThread) [homeassistant.components.mqtt.light.schema_basic] The 'value_template' option is deprecated, please replace it with 'state_value_template'
2021-09-03 10:56:11 WARNING (MainThread) [homeassistant.components.mqtt.light.schema_basic] The 'value_template' option is deprecated, please replace it with 'state_value_template'
2021-09-03 10:56:11 WARNING (MainThread) [homeassistant.components.mqtt.light.schema_basic] The 'value_template' option is deprecated, please replace it with 'state_value_template'
2021-09-03 10:56:11 WARNING (MainThread) [homeassistant.components.mqtt.light.schema_basic] The 'value_template' option is deprecated, please replace it with 'state_value_template'

I believe the custom integrations errorrs are normal since they were showing before. But about “value_template”, I changed all that I could find in my configuration to “state_value_template” and a lot of sensors is not working anymore (probably because the update was not successful), still in 2021.8.8.
Where I could find “[homeassistant.components.mqtt.light.schema_basic]”?
Any tip is welcome.

It looks like it is a bug https://github.com/home-assistant/addons/issues/2078

Some people have solved it manually installing the idna with pip but I haven’t had to do this myself.

The error you are seeing is for MQTT discovery, note that MQTT is in the indicator on the error:

Undo all your value_template changes and fix your MQTT configuration. If the lights come from an outside software, then you need to adjust the discovery information from the outside software.

Thank you both for your fast response.
I will undo it. My MQTT configuration is pretty basic:

mqtt:
  broker: localhost
  port: 1883
  username: !secret mqtt_username
  password: !secret mqtt_password

Maybe it has something to do with tasmota. The only thing that I can think. I think I can configure them to no being discovered or also I can remove “discovery:” from the config… I will some of this maybe…

It has to do with whatever is creating your discovery information. So if tasmota is creating the information, then you need to fix the information that’s being sent from tasmota.

After updating to this release, system is no longer starting. All I get in the docker logs is:

2021-09-03 17:47:03 ERROR (MainThread) [root] Uncaught exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 322, in <module>
    sys.exit(main())
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 314, in main
    exit_code = runner.run(runtime_conf)
  File "/usr/src/homeassistant/homeassistant/runner.py", line 108, in run
    return asyncio.run(setup_and_run_hass(runtime_config))
  File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
    return future.result()
  File "/usr/src/homeassistant/homeassistant/runner.py", line 94, in setup_and_run_hass
    hass = await bootstrap.async_setup_hass(runtime_config)
  File "/usr/src/homeassistant/homeassistant/bootstrap.py", line 90, in async_setup_hass
    async_enable_logging(
  File "/usr/src/homeassistant/homeassistant/bootstrap.py", line 345, in async_enable_logging
    err_handler.doRollover()
  File "/usr/local/lib/python3.9/logging/handlers.py", line 163, in doRollover
    self.stream.close()
OSError: [Errno 5] I/O error
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

Any Idea whats going on (using container version)?

I’m curious how it works if more integrations can use the USB device. Will connecting Conbee2 result in choice between zha and z2m? If I already use z2m, will it still offer zha?

I just pointing to similar situation with Shelly integration which behaves like it would be the only choice for Shellies (while there are at least 3).

1 Like

On mine I am using the MQTT broker addon then the MQTT integration.

On the tasmota boxes I run setoption19 1

It then finds them under the MQTT integration instead of the Tasmota integration, that appears to work for me.

My MQTT config on my devices look like;

Topic - tasmota_%06X
Full Topic - %prefix%/%topic%/

Which I think are the defaults

Intrestingly they do come in with value_template

name: TV Lights
state_topic: tele/tasmota_BD4679/STATE
availability_topic: tele/tasmota_BD4679/LWT
payload_available: Online
payload_not_available: Offline
command_topic: cmnd/tasmota_BD4679/POWER
payload_off: 'OFF'
payload_on: 'ON'
value_template: '{{value_json.POWER}}'
unique_id: BD4679_RL_1
device:
  identifiers:
    - BD4679
platform: mqtt

also tried “homeassistant/raspberrypi4-homeassistant:dev” with same error.
switching back to “homeassistant/raspberrypi4-homeassistant:2021.8.8” works. So it seems to be a problem with this new version.

1 Like