My guess to definitely check your outlets and make sure to check both the top and the bottom separately. Your picture isn’t really clear concerning the incoming wiring and what it connects to in the box but I think this is what you’ll find.
In the older days is was very common to wire the wall switch to an outlet for lamps. However you need to check both top and bottom outlets because typically only half of the outlet is wired to the switch to control the lamps and the other half is always on power. And that is what I see in your picture, the use of the wire on the second unknown switch is using the red wire (presumably for the lamp outlet) and the black wire in that bundle is wire nut with the constant black incoming power indicating that is being used to power the other half of the outlet.
FYI: It looks like your power to the ceiling fan is connected right there in the box which is a bonus to do the following. If you are looking to automate the ceiling fan and the fan light I would put the GE 12730 Z-Wave Smart Fan Control designed specifically for motor control at the switch location and the smart lighting dimmer like the Aeon Labs DSC27103-ZWUS Micro Light Dimmer mounted up in the canopy of the fan. Or if you prefer to manually control lights as well from the wall use a Two Single-Pole switch, the bottom could replace the unknown switch function and the top is wired to the DSC27103 located in the gangbox right behind the double switch. Your gangbox looks big enough to accommodate it just fine. This would allow you to turn on-off the fan lights from the wall but the dimming would be have to go through the mobile app. And finally if you don’t want lamp outlet control you could use the other half of the gangbox with a full size standard z-wave dimmer switch for the fan lights. Just hardwire jumper the wall lamp outlets to be always on.
Here is thread with photos on doing this sort of thing…