HomeKit Switch

I have set up a HomeKit switch for an automation built in HA. How we the switch is showing as always on. Is there a way to set it to off?