I had recently updated my integrations and noticed that my day/night mode was no longer working. I traced it to a bug that was introduced in https://github.com/rroller/dahua/pull/327 - Non-empty Python strings are always truthy, so this statement always evaluates to True:
if 'NVR4108HS' or 'IPC-Color4K' in model:
This PR correctly searches the model string and uses an array to make it easier to add more models in the future.
I had recently updated my integrations and noticed that my day/night mode was no longer working. I traced it to a bug that was introduced in https://github.com/rroller/dahua/pull/327 - Non-empty Python strings are always truthy, so this statement always evaluates to
True
:This PR correctly searches the model string and uses an array to make it easier to add more models in the future.