Solar panels do not warm up when placed by script, eg. Bluebuild, Repair Turrets, etc.
local function on_built(entity)
...
end
local function on_remove(entity)
...
end
local pre_remove_events = {defines.events.on_pre_player_mined_item, defines.events.on_robot_pre_mined, defines.events.on_entity_died, defines.events.script_raised_destroy}
script.on_event(pre_remove_events, function(event) on_remove(event.entity) end)
local build_events = {defines.events.on_built_entity, defines.events.on_robot_built_entity}
script.on_event(build_events, function(event) on_built(event.created_entity) end)
local script_build_events = {defines.events.script_raised_built, defines.events.script_raised_revive}
script.on_event(script_build_events, function(event) on_built(event.entity) end)
script.on_event(defines.events.on_entity_cloned, function(event) on_built(event.destination) end)
local script_build_events = {defines.events.script_raised_built, defines.events.script_raised_revive}
script.on_event(script_build_events, function(event) on_built(event.entity) end)
script.on_event(defines.events.on_entity_cloned, function(event) on_built(event.destination) end)