I've been writing an all-purpose farming program and wanted to account for all three possible power sources: the coal generator, solar panel, and just using charger blocks. The generator has an API, so a simple if statement with the component library can check for it; however there is no function to detect certain upgrades such as the solar panel.
Is there a way to tell if one is installed, even at night?