Home Assitant Automation and Switch

I am working on an automation that will turn off an arduino switch when either no one is home or anyone is home (2 automations). There is also a switch button on the overview page. Both the switch and the automation work to turn on and off the device. My issue is that the automation does not seem to communicate the change to the homeassistant switch in the frontend. Example: if the switch is off and the automation turn on the switch, the device does in fact turn on, but the home assistant swtich remains in the off position. I am also not seeing the change in the log. It’s almost as if the automation is completely separate from home assistant and that the home assistant frontend has no clue what it did. Is this a normal behavior? Is there a way I can force the automation to also update the frontend switch?

How are you communicating with the switch? MQTT?

No, I am just using the Arduino component and the Arduino is connected to the server with a USB cable.

I’m sorry I don’t have any experience with the arduino component…yet. just starting to get into using them.

From my research, it looks like the Arduino component isn’t really being supported anymore. Kind of unfortunate as I prefer to physically connect devices when possible.