Skip to content

'NoneType' object is not subscriptable #21

@themistymay

Description

@themistymay

Got the following error when using this in HA. Not sure if you want this issue here or in the HA repo.

homeassistant    | 2021-09-20 11:57:43 ERROR (MainThread) [homeassistant.components.sensor] eight_sleep: Error on device update!
homeassistant    | Traceback (most recent call last):
homeassistant    |   File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity
homeassistant    |     await entity.async_device_update(warning=False)
homeassistant    |   File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 633, in async_device_update
homeassistant    |     await task
homeassistant    |   File "/usr/src/homeassistant/homeassistant/components/eight_sleep/sensor.py", line 326, in async_update
homeassistant    |     temp = self._eight.room_temperature()
homeassistant    |   File "/usr/local/lib/python3.9/site-packages/pyeight/eight.py", line 195, in room_temperature
homeassistant    |     if obj.current_values['processing']:
homeassistant    |   File "/usr/local/lib/python3.9/site-packages/pyeight/user.py", line 407, in current_values
homeassistant    |     'date': self.current_session_date,
homeassistant    |   File "/usr/local/lib/python3.9/site-packages/pyeight/user.py", line 167, in current_session_date
homeassistant    |     date = self.intervals[0]['ts']
homeassistant    | TypeError: 'NoneType' object is not subscriptable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions