Could not finalize sonoff integration

I try to integrate a eWeLink/Sonoff-2-channel-switch.

I used this documentation.
https://github.com/AlexxIT/SonoffLAN#local-and-cloud-mode

I got to the point where the hidden file .sonoff.json ist created.

But the switch is not available in home assistant.

Im my configuration.yaml it looks like this:

DG sonoff/eWeLink-integration

sonoff:
username: !secret ewelink_user
password: !secret ewelink_pwd
devices:
10001e3495:
device_class: switch
name: Deckenlampe

But the error log after rebooting looks like this:

File “/config/custom_components/sonoff/switch.py”, line 44, in async_added_to_hass
device = self._init()
File “/config/custom_components/sonoff/sonoff_main.py”, line 235, in _init
self._update_handler(state, attrs)
File “/config/custom_components/sonoff/switch.py”, line 51, in _update_handler
self._is_on = any(self._is_on_list(state))
File “/config/custom_components/sonoff/sonoff_main.py”, line 252, in _is_on_list
return [state[‘switch’] == ‘on’]
KeyError: ‘switch’

Any idea, what’s wrong?