def get_pv_power(agent):
    """ Check if the pv panel is active. If it is, get the power out of it, otherwise return 0"""
    pv_power = 0

    if agent.pv_panel.is_active():
        pv_power = agent.pv_panel.erogate()
    return pv_power