From 92ef93071faf0efb6075d70b6b27eb640e965aba Mon Sep 17 00:00:00 2001 From: christian1180 <126362145+christian1180@users.noreply.github.com> Date: Sat, 21 Dec 2024 12:53:29 +0100 Subject: [PATCH] CUX2802 aufgenommen CUX2802 aufgenommen config/mapping.json js/script.js.php components/CUX2802.php --- components/CUX2802.php | 250 +++++++++++++++++++++++++++++++++++++++++ config/mapping.json | 8 ++ js/script.js.php | 1 + 3 files changed, 259 insertions(+) create mode 100644 components/CUX2802.php diff --git a/components/CUX2802.php b/components/CUX2802.php new file mode 100644 index 0000000..fbc9145 --- /dev/null +++ b/components/CUX2802.php @@ -0,0 +1,250 @@ +  ' ; } + else { $ShowTime = ''; } + } + else { $ShowTime = ''; } + if(isset($component['label'])) + { + $Label = explode(",",$component['label']); + if($Label[0] <> "") { $LabelKurz = ''.$Label[0].''; } + else { $LabelKurz = ''; } + if($Label[1] <> "") { $LabelLang = ''.$Label[1].''; } + else { $LabelLang = ''; } + } + else + { + $LabelKurz = 'Kurz'; + $LabelLang = 'Lang'; + } + + return '
' + . '
' . $component['name'] . '
' + . '
' + . $ShowTime + . $LabelKurz + . $LabelLang + . '
' + . '
' + . '
'; + } + + if ($component['parent_device_interface'] == 'CUxD' && $component['visible'] == 'true' && isset($component['STATE'])) { + if (!isset($component['color'])) $component['color'] = '#595959'; + // ShowTime - Uhrzeit der letzten Änderung anzeigen + if(isset($component['showtime'])) + { + if($component['showtime'] == "true") { $ShowTime = '  ' ; } + else { $ShowTime = ''; } + } + else { $ShowTime = ''; } + return '
' + . '
' . $component['name'] . '
' + . '
' + . $ShowTime + . '' + . '
' + . '
' + . '
'; + } + + if ($component['parent_device_interface'] == 'CUxD' && $component['visible'] == 'true' && isset($component['LEVEL']) && isset($component['STOP'])) { + $modalId = mt_rand(); + + if (!isset($component['color'])) $component['color'] = '#595959'; + // ShowTime - Uhrzeit der letzten Änderung anzeigen + if(isset($component['showtime'])) + { + if($component['showtime'] == "true") { $ShowTime = '  ' ; } + else { $ShowTime = ''; } + } + else { $ShowTime = ''; } + return '
' + . '
' + . '
' . $component['name'] . '
' + . '
' + . $ShowTime + . '' + . '
' + . '
' + . '
' + . '
' + . '
' + . '
' + . '' + . '' + . '' + . '' + . '' + . '' + . '
' + . '
' + . '
' + . '
'; + } + + if ($component['parent_device_interface'] == 'CUxD' && $component['visible'] == 'true' && isset($component['LEVEL']) && isset($component['OLD_LEVEL'])) { + $modalId = mt_rand(); + + if (!isset($component['color'])) $component['color'] = '#595959'; + // ShowTime - Uhrzeit der letzten Änderung anzeigen + if(isset($component['showtime'])) + { + if($component['showtime'] == "true") { $ShowTime = '  ' ; } + else { $ShowTime = ''; } + } + else { $ShowTime = ''; } + return '
' + . '
' + . '
' . $component['name'] . '
' + . '
' + . $ShowTime + . '' + . '
' + . '
' + . '
' + . '
' + . '
' + . '
' + . '' + . '' + . '' + . '' + . '' + . '' + . '
' + . '
' + . '
' + . '
' + . '
' + . '
' + . '' + . '' + . '' + . '' + . '
' + . '
' + . '' + . '' + . '
' + . '
' + . '
' + . '
' + . '
' + . '
'; + } + + // RGBW + if ($component['parent_device_interface'] == 'CUxD' && $component['visible'] == 'true' && isset($component['RGBW'])) { + $modalId = mt_rand(); + + if (!isset($component['color'])) $component['color'] = '#595959'; + // ShowTime - Uhrzeit der letzten Änderung anzeigen + if(isset($component['showtime'])) + { + if($component['showtime'] == "true") { $ShowTime = '  ' ; } + else { $ShowTime = ''; } + } + else { $ShowTime = ''; } + return '
' + . '
' + . '
' . $component['name'] . '
' + . '
' + . $ShowTime + . '' + . '
' + . '
' + . '
' + . '
' + . '
' + . '
' + . '' + . '' + . '' + . '' + . '' + . '' + . '
' + . '
' + . '
' + . '
' + . '
' + . '
' + . '' + . '' + . '' + . '' + . '
' + . '
' + . '' + . '' + . '
' + . '
' + . '
' + . '
' + . '
' + . '
'; + } +} diff --git a/config/mapping.json b/config/mapping.json index 3553a74..e29138c 100644 --- a/config/mapping.json +++ b/config/mapping.json @@ -248,6 +248,10 @@ { "name": "HmIPW-DRD3", "icon": "light_light_dim_100.png" + }, + { + "name": "VIR-LG-RGBW-DIM", + "icon": "light_light_dim_100.png" } ], "CUxD": [ @@ -255,6 +259,10 @@ "name": "CUX2801", "icon": "it_net.png" }, + { + "name": "CUX2802", + "icon": "it_net.png" + }, { "name": "CUX2803", "icon": "it_internet.png" diff --git a/js/script.js.php b/js/script.js.php index 8821fe1..ab8fd91 100644 --- a/js/script.js.php +++ b/js/script.js.php @@ -2409,6 +2409,7 @@ $('[data-id="' + ise_id + '"]').html(value); break; case 'CUX2801': + case 'CUX2802': case 'CUX2804': switch (datapoint) { case 'CURRENT':