Hikvision Config Flow: Entity specific config

I’ve been looking at implementing config flow for the Hikvision integration, but am unsure how to address some of the existing config options. Currently there are entity specific sensors to ignore (omit) a sensor, or add a delay to sensor updates.

Ignore seems like it should be managed by users disabling entities so should be relatively straightforward, but I’m unsure how to manage the delay setting. I guess number input entities could be created for each delay, but that doubles the number of sensors. I thought of dynamically building the options flow schema, but that causes problems for translations.

Any thoughts?

If interested, the code so far is available at GitHub - deosrc/homeassistant-core at feature/hikvision/config-flow.

I think I’ve got an idea.

The description for the delay indicates it is to prevent rapid toggling of the sensors. This seems like it would make sense based on sensor type.

For example, the motion sensors on my NVR are often triggered a lot when it is raining. So being able to set all of the “Motion” sensors with a delay of a few seconds seems like it would make a lot of sense.

This feels like a good compromise between the current functionality of HA, and allowing for some level of backwards compatibility.