kvj / hass_nuki_ng

Better support for Nuki devices in the Home Assistant
MIT License
185 stars 36 forks source link

Gracefully mapping value to lock_state (#168) #172

Closed inc-ali closed 10 months ago

inc-ali commented 10 months ago

I added a default value if the state value in the dictionary is for whatever reason not mappable to LockStates. This is exactly what is already done in binary_sensor.py:121

Note: This does not fix the underlying issue, as the value shouldn't be None at all, or is this intentional @kvj? Nevertheless I still think the mapping should be handled gracefully.

kvj commented 10 months ago

Thanks!