core: After upgrade to .112.1 Lutron-Caseta occupancy sensor is no longer recognized at startup

The problem

HA started up error free in version 0.111.4. As soon as I upgraded to 0.112 the lutron-caseta threw an error during startup. See trace log below.

Environment

  • Home Assistant Core release with the issue: 0 .112

  • Last working Home Assistant Core release (if known): 0 .111.4

  • Operating environment (OS/Container/Supervised/Core): arch | armv7l – | – chassis |   dev | false docker | true docker_version | 19.03.9 hassio | true host_os | Raspbian GNU/Linux 10 (buster) installation_type | Home Assistant Supervised os_name | Linux os_version | 4.19.97-v7l+ python_version | 3.7.7 supervisor | 228 timezone | America/Denver version | 0.112.1 virtualenv | false

  • Integration causing this issue: lutron_caseta

  • Link to integration documentation on our website:

Problem-relevant configuration.yaml

lutron_caseta: host: 192.168.4.53 keyfile: caseta.key certfile: caseta.crt ca_certs: caseta-bridge.crt


Traceback/Error logs

2020-07-02 20:51:33 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up lutron_caseta platform for binary_sensor Traceback (most recent call last): File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 186, in _async_setup_platform await asyncio.gather(pending) File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 292, in async_add_entities await asyncio.gather(tasks) File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 343, in _async_add_entity device_info = entity.device_info File “/usr/src/homeassistant/homeassistant/components/lutron_caseta/init.py”, line 134, in device_info “identifiers”: {(DOMAIN, self.serial)}, File “/usr/src/homeassistant/homeassistant/components/lutron_caseta/init.py”, line 123, in serial return self._device[“serial”] KeyError: ‘serial’


Additional information

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 20 (7 by maintainers)

Most upvoted comments

I do have the same issue with 112. I hope this get fixed soon. I can`t upgrade to 112 until this is fixed. 😦

This change was made in 112 https://github.com/home-assistant/core/pull/36706

Before this change, this integration (Lutron Caseta) only adds entities, NOT devices. After this change, this integration will add a device to device registry for every physical device unit and relate the entities to the corresponding devices.

it is this new code that is failing