logging.debug('Calling: get_consumption_phase_3') consumption_phase_3 = p.get_consumption_phase_3() # Get values for string 1 power and string 2 power logging.debug('Calling: get_string1_current') string1Current = p.get_string1_current() logging.debug('Calling: get_string2_current') string2Current = p.get_string2_current() logging.debug('Calling: get_string1_voltage') string1Voltage = p.get_string1_voltage() logging.debug('Calling: get_string2_voltage') string2Voltage = p.get_string2_voltage() if current_solar_power < 0: # Piko is off logging.info('Piko is off, going to sleep 10 minutes.') # Set state of homematic logging.debug('Calling: set_state HM_PV_REMAINING_POWER_ID') hm.set_state(HM_PV_REMAINING_POWER_ID, 0) logging.debug('Calling: set_state HM_PV_STRING_1_POWER_ID') hm.set_state(HM_PV_STRING_1_POWER_ID, 0) logging.debug('Calling: set_state HM_PV_STRING_2_POWER_ID') hm.set_state(HM_PV_STRING_2_POWER_ID, 0) logging.debug('Calling: time.sleep 600')