mirror of
				https://github.com/karl0ss/MiGenieHASS.git
				synced 2025-11-04 00:21:02 +00:00 
			
		
		
		
	nextEventTime
This commit is contained in:
		
							parent
							
								
									f052a4a2ec
								
							
						
					
					
						commit
						9ab4d3b7ff
					
				@ -38,7 +38,8 @@ def get_heating_status()->dict:
 | 
			
		||||
            "currentSetpoint": utils.convert_to_real_temp(data['currentSetpoint']),
 | 
			
		||||
            "lastTimerSetPoint": utils.convert_to_real_temp(data['lastTimerSetPoint']),
 | 
			
		||||
            "lastTimerDurationMinutes": data['lastTimerDurationMinutes'],
 | 
			
		||||
            "nextScheduleEventUtcTime": utils.format_datetime(data['nextScheduleEventUtcTime'])
 | 
			
		||||
            "nextScheduleEventUtcTime": utils.format_datetime(data['nextScheduleEventUtcTime']),
 | 
			
		||||
            "nextEventTime":utils.format_time(data['nextScheduleEventUtcTime'])
 | 
			
		||||
        }
 | 
			
		||||
    
 | 
			
		||||
    return heatingStatus, 200
 | 
			
		||||
 | 
			
		||||
@ -23,7 +23,9 @@ def get_water_status()->dict:
 | 
			
		||||
            "currentSetpoint": utils.convert_to_real_temp(data['currentSetpoint']),
 | 
			
		||||
            "lastTimerSetPoint": utils.convert_to_real_temp(data['lastTimerSetPoint']),
 | 
			
		||||
            "lastTimerDurationMinutes": data['lastTimerDurationMinutes'],
 | 
			
		||||
            "nextScheduleEventUtcTime": utils.format_datetime(data['nextScheduleEventUtcTime'])
 | 
			
		||||
            "nextScheduleEventUtcTime": utils.format_datetime(data['nextScheduleEventUtcTime']),
 | 
			
		||||
            "nextEventTime":utils.format_time(data['nextScheduleEventUtcTime'])
 | 
			
		||||
            
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
    return waterStatus, 200
 | 
			
		||||
 | 
			
		||||
@ -39,4 +39,15 @@ def format_datetime(date_time:int)->str:
 | 
			
		||||
    Returns:
 | 
			
		||||
        str: _description_
 | 
			
		||||
    """
 | 
			
		||||
    return datetime.datetime.fromtimestamp(date_time).strftime('%d-%m-%Y %H:%M:%S')
 | 
			
		||||
    return datetime.datetime.fromtimestamp(date_time).strftime('%d-%m-%Y %H:%M:%S')
 | 
			
		||||
 | 
			
		||||
def format_time(date_time:int)->str:
 | 
			
		||||
    """_summary_
 | 
			
		||||
 | 
			
		||||
    Args:
 | 
			
		||||
        date_time (int): _description_
 | 
			
		||||
 | 
			
		||||
    Returns:
 | 
			
		||||
        str: _description_
 | 
			
		||||
    """
 | 
			
		||||
    return datetime.datetime.fromtimestamp(date_time).strftime('%H:%M:%S')
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user