Volume_Cont Added
This commit is contained in:
		@@ -100,6 +100,9 @@ class GoogleHome {
 | 
				
			|||||||
						$tempDevice[$deviceId['id']]['thermostatTemperatureAmbient'] = $lastRecord['value'];
 | 
											$tempDevice[$deviceId['id']]['thermostatTemperatureAmbient'] = $lastRecord['value'];
 | 
				
			||||||
						$tempDevice[$deviceId['id']]['thermostatTemperatureSetpoint'] = $lastRecord['value'];
 | 
											$tempDevice[$deviceId['id']]['thermostatTemperatureSetpoint'] = $lastRecord['value'];
 | 
				
			||||||
					break;
 | 
										break;
 | 
				
			||||||
 | 
										case 'vol_cont':
 | 
				
			||||||
 | 
											$tempDevice[$deviceId['id']]['currentVolume'] = $lastRecord['value'];
 | 
				
			||||||
 | 
										break;
 | 
				
			||||||
					default:
 | 
										default:
 | 
				
			||||||
						$tempDevice[$deviceId['id']]['on'] = ($lastRecord['value'] == 1 ? true : false);
 | 
											$tempDevice[$deviceId['id']]['on'] = ($lastRecord['value'] == 1 ? true : false);
 | 
				
			||||||
						break;
 | 
											break;
 | 
				
			||||||
@@ -310,6 +313,7 @@ static function executeTermostatMode($subDeviceId, $executionCommand){
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static function executeVolume($subDeviceId, $executionCommand){
 | 
					static function executeVolume($subDeviceId, $executionCommand){
 | 
				
			||||||
 | 
						echo $executionCommand['params']['volumeLevel'];
 | 
				
			||||||
	$status = 'OFFLINE';
 | 
						$status = 'OFFLINE';
 | 
				
			||||||
	$online = false;
 | 
						$online = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -326,7 +330,7 @@ static function executeVolume($subDeviceId, $executionCommand){
 | 
				
			|||||||
				$waiting++;
 | 
									$waiting++;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		if ($waiting > $executed){
 | 
							if ($waiting < $executed){
 | 
				
			||||||
			$status = "PENDING";
 | 
								$status = "PENDING";
 | 
				
			||||||
			$online = true;
 | 
								$online = true;
 | 
				
			||||||
			$currentVolume = $executionCommand['params']['volumeLevel'];
 | 
								$currentVolume = $executionCommand['params']['volumeLevel'];
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user