alarm: allow for time with seconds
This commit is contained in:
		
							parent
							
								
									6d5340e9ca
								
							
						
					
					
						commit
						31e0664aa6
					
				
							
								
								
									
										2
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								Cargo.lock
									
									
									
										generated
									
									
									
								
							| @ -358,7 +358,7 @@ dependencies = [ | ||||
| 
 | ||||
| [[package]] | ||||
| name = "mqttAutomation" | ||||
| version = "1.3.1" | ||||
| version = "1.3.2" | ||||
| dependencies = [ | ||||
|  "chrono", | ||||
|  "crossbeam", | ||||
|  | ||||
| @ -1,6 +1,6 @@ | ||||
| [package] | ||||
| name = "mqttAutomation" | ||||
| version = "1.3.1" | ||||
| version = "1.3.2" | ||||
| edition = "2021" | ||||
| 
 | ||||
| [dependencies] | ||||
|  | ||||
| @ -132,7 +132,7 @@ impl Automation { | ||||
|         if topic.starts_with("alarm/set") { | ||||
| 
 | ||||
|             let mut time = message.payload.split(':'); | ||||
|             if time.clone().count() != 2 { | ||||
|             if time.clone().count() != 2 && time.clone().count() != 3 { | ||||
|                 println!("ERROR: config_message_in: alarm/set has invalid payload. incorect number of slices ({})", message.payload) | ||||
|             } | ||||
|             else { | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user