kvj / hass_nuki_ng

Better support for Nuki devices in the Home Assistant
MIT License
167 stars 32 forks source link

Gracefully mapping value to lock_state (#168) #172

Closed inc-ali closed 5 months ago

inc-ali commented 6 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 5 months ago

Thanks!