ha-emporia-vue: 1min sensors unavailable since the backing API change

I updated to 0.6.4, but not everything is working for me yet. I have a Vue Utility connect, and 4 plugs. All of them report the 1 day and 1 month sensor.

I tried uninstalling the integration completely, and reinstalling. That didn’t fix the issue either. I see this in the logs:

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/emporia_vue/sensor.py:158
Integration: Emporia Vue (documentation)
First occurred: 12:40:21 PM (1 occurrences)
Last logged: 12:40:21 PM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 134, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 265, in _async_refresh
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 325, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 464, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 498, in _async_write_ha_state
    state = self._stringify_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 470, in _stringify_state
    state = self.state
  File "/config/custom_components/emporia_vue/sensor.py", line 91, in state
    return self.scale_usage(usage)
  File "/config/custom_components/emporia_vue/sensor.py", line 158, in scale_usage
    usage = round(usage, 3)
TypeError: type NoneType doesn't define __round__ method

and also:

This error originated from a custom integration.

Logger: homeassistant
Source: custom_components/emporia_vue/sensor.py:150
Integration: Emporia Vue (documentation)
First occurred: 12:40:20 PM (1 occurrences)
Last logged: 12:40:20 PM

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 134, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 265, in _async_refresh
    update_callback()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 325, in _handle_coordinator_update
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 464, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 498, in _async_write_ha_state
    state = self._stringify_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 470, in _stringify_state
    state = self.state
  File "/config/custom_components/emporia_vue/sensor.py", line 91, in state
    return self.scale_usage(usage)
  File "/config/custom_components/emporia_vue/sensor.py", line 150, in scale_usage
    usage = round(60 * 1000 * usage)  # convert from kwh to w rate
TypeError: unsupported operand type(s) for *: 'int' and 'NoneType'

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 22 (6 by maintainers)

Most upvoted comments

After rebooting my 1min sensors showed up but the “energy” panel wont let me select anything other 1d or 1mon sensors. Is this working as attended?

The home assistant energy dashboard only works with energy sensors and not power sensors. You should choose the 1 Day sensors for the most accuracy.

The dashboard looks like the Tesla energy flow diagram but doesn’t work the same, it just shows daily totals.

Hi @magico13, I want to thank you for all your work on this!!! I just signed up on GitHub to ask about the 1m with my custom_integrations install, but as with every other time something on this didn’t work right (due to Emporia changing stuff on you), you are already on it! Thank you!