nitobuendia / oura-custom-component

Oura Custom Component for Home-Assistant. Adds Oura Ring sleep information.
108 stars 25 forks source link

Why am I getting this error? #16

Closed chintito4ever closed 2 years ago

chintito4ever commented 2 years ago

Logger: homeassistant.components.websocket_api.http.connection Source: components/hassio/init.py:609 Integration: Home Assistant WebSocket API (documentation, issues) First occurred: 1:59:05 AM (3 occurrences) Last logged: 1:13:16 PM

[547569659040] The system cannot restart because the configuration is not valid: Invalid config for [sensor.template]: expected dictionary for dictionary value @ data['sensors']. Got [OrderedDict([('name', 'Sleep Breath Average Yesterday'), ('unique_id', 'sleep_breath_average_yesterday'), ('unit_of_measurement', 'bpm'), ('state', '{{ states.sensor.sleep_quality.attributes.yesterday.breath_average }}\n'), ('icon', 'mdi:lungs')]), OrderedDict([('name', 'Sleep Temperature Delta Yesterday'), ('unique_id', 'sleep_temperature_delta_yesterday'), ('unit_of_measurement', '°C'), ('device_class', 'temperature'), ('state', '{{ states.sensor.sleep_quality.attributes.yesterday.temperat.... (See ?, line ?). [547454649584] The system cannot restart because the configuration is not valid: Invalid config for [sensor.oura]: [yesterday] is an invalid option for [sensor.oura]. Check: sensor.oura->yesterday. (See ?, line ?). Invalid config for [sensor.template]: expected dictionary for dictionary value @ data['sensors']. Got [OrderedDict([('name', 'Sleep Breath Average Yesterday'), ('unique_id', 'sleep_breath_average_yesterday'), ('unit_of_measurement', 'bpm'), ('state', '{{ states.sensor.sleep_quality.attributes.yesterday.breath_average }}\n'), ('icon', 'mdi:lungs')]), OrderedDict([('name', 'Sleep Temperature Delta Yesterday'), ('unique_id', 'sleep_temperature_delta_yesterday'), ('unit_of_measurement', '°C'), ('device_class', 'temperature'), ('state', '{{ states.sensor.sleep_quality.attributes.yesterday.temperat.... (See ?, line ?). Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 190, in handle_call_service await hass.services.async_call( File "/usr/src/homeassistant/homeassistant/core.py", line 1630, in async_call task.result() File "/usr/src/homeassistant/homeassistant/core.py", line 1667, in _execute_service await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)( File "/usr/src/homeassistant/homeassistant/components/hassio/init.py", line 609, in async_handle_core_service raise HomeAssistantError( homeassistant.exceptions.HomeAssistantError: The system cannot restart because the configuration is not valid: Invalid config for [sensor.template]: expected dictionary for dictionary value @ data['sensors']. Got [OrderedDict([('name', 'Sleep Breath Average Yesterday'), ('unique_id', 'sleep_breath_average_yesterday'), ('unit_of_measurement', 'bpm'), ('state', '{{ states.sensor.sleep_quality.attributes.yesterday.breath_average }}\n'), ('icon', 'mdi:lungs')]), OrderedDict([('name', 'Sleep Temperature Delta Yesterday'), ('unique_id', 'sleep_temperature_delta_yesterday'), ('unit_of_measurement', '°C'), ('device_class', 'temperature'), ('state', '{{ states.sensor.sleep_quality.attributes.yesterday.temperat.... (See ?, line ?).

nitobuendia commented 2 years ago

Hi @chintito4ever - thanks for using the component and coming here to ask. That error seems to related to a Template sensor where you're passing fields that are not expected by the template sensor. This repository is only concerned with Oura sensors, not the templated ones. As such, the Home-Assistant community might be a better suited place to ask and get support. This being said, it would help for anyone to troubleshoot if you pasted the configuration you're using.