Some tveeks

This commit is contained in:
JonatanRek 2020-06-29 22:00:00 +02:00
parent a1358c53fd
commit 3669fde596
2 changed files with 43 additions and 40 deletions

View File

@ -7,7 +7,7 @@ class GoogleHome {
$devicesData = DeviceManager::getAllDevicesInRoom($roomData['room_id']);
foreach ($devicesData as $deviceKey => $deviceData) {
$traids = [];
$attributes = null;
$attributes = [];
//Google Compatibile Action Type
$actionType = GoogleHomeDeviceTypes::getAction($deviceData['type']);
@ -22,7 +22,7 @@ class GoogleHome {
$deviceAttributes = GoogleHomeDeviceTypes::getAttribute($subDeviceData['type']);
if ($deviceAttributes != "") {
$attributes = $deviceAttributes;
$attributes += $deviceAttributes;
}
}

View File

@ -113,6 +113,7 @@ class GoogleHomeDeviceTypes {
],
],
'media_apps' => [
"availableApplications" => [
[
"key" => "kodi",
"names" => [
@ -120,18 +121,20 @@ class GoogleHomeDeviceTypes {
"Kodi",
],
"lang" => "en"
]
],
],
],
],
'media_inputs' => [
[
"availableApplications" => [
"key" => "pc",
"names" => [
"name_synonym" => [
"PC",
],
"lang" => "en"
"lang" => "en",
],
],
],
];