I can’t find the switch in the props. But you don’t need to add a switch at all, just check if the props for the item is set. if not, change visibility to false
This check can be usefull at other places as well and should be used for item states as well.
Otherwise you will find a lot of warnings in the logs about trying to update undefined items…
No Problem, I have changed the widget with my suggestion, which imho is a better solution, as it can reduce configs if wider used. Please also consider the Item state check like described.
We often see posts about log entries with undefined items coming from UI widgets.