How to disable or hide switch in Lovelace during specific hours

Hi all,
Can anyone provide example of how to hide or disable a switch in Lovelace at specific times? I want to prevent users from turning on a switch between 8am and 5pm.