core: Youless sensor not available in Energy "Configure Grid Consumption"

The problem

Cannot find the youless power sensor in the Grid Consumption configuration inside the Energy service setup:

image

I added the youless integration successfully and the device sensor is setup and working correctly:

image

image

image

Thanks.

What is version of Home Assistant Core has the issue?

2021.8.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

youless

Link to integration documentation on our website

https://www.home-assistant.io/integrations/youless/

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.sensor
Source: components/youless/sensor.py:107
Integration: Sensor (documentation, issues)
First occurred: 15:34:54 (2 occurrences)
Last logged: 15:34:54

Error adding entities for domain sensor with platform youless
Error while setting up youless platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 501, in _async_add_entity
    unit_of_measurement=entity.unit_of_measurement,
  File "/usr/src/homeassistant/homeassistant/components/youless/sensor.py", line 76, in unit_of_measurement
    if self.get_sensor is None:
  File "/usr/src/homeassistant/homeassistant/components/youless/sensor.py", line 107, in get_sensor
    return self.coordinator.data.gas_meter
  File "/usr/local/lib/python3.9/site-packages/youless_api/__init__.py", line 59, in gas_meter
    return self._device.gas_meter
  File "/usr/local/lib/python3.9/site-packages/youless_api/devices.py", line 92, in gas_meter
    return YoulessSensor(self._cache['gas'], 'm3')
KeyError: 'gas'

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 5
  • Comments: 17 (7 by maintainers)

Most upvoted comments

I have a pull-request open currently to fix the other issue. Which should also resolve the problem you are having with not being able to select sensors in the energy dashboard

@frenck ah I see. Thx for the reply.

@TheGabeMan this is a new feature, thus it has to wait at least until 2021.9