Skip to content

Commit

Permalink
Aufnahme von ELV-SH-BS2 und HmIP-WHS2
Browse files Browse the repository at this point in the history
Aufnahme von ELV-SH-BS2 und HmIP-WHS2
  • Loading branch information
christian1180 committed Feb 12, 2025
1 parent 144377e commit 70caec0
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 0 deletions.
28 changes: 28 additions & 0 deletions components/ELV-SH-BS2.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
function ELV_SH_BS2($component) {

if(!isset($component['button'])) {
$component['button'] = 'switch';
}

if ($component['parent_device_interface'] == 'HmIP-RF' && $component['visible'] == 'true' && isset($component['STATE'])) {

// ShowTime - Uhrzeit der letzten Änderung anzeigen
if(isset($component['showtime']))
{
if($component['showtime'] == "true") { $ShowTime = '<span class="info" data-id="' . $component['ise_id'] . 't" data-component="showtime" data-datapoint="showtime"></span>' ; }
else { $ShowTime = ''; }
}
else { $ShowTime = ''; }


if (!isset($component['color'])) $component['color'] = '#FFCC00';
return '<div class="hh" style=\'border-left-color: '.$component['color'].'; border-left-style: solid;\'>'
. '<div class="pull-left"><img src="icon/' . $component["icon"] . '" class="icon">' . $component['name'] . '</div>'
. '<div class="pull-right">'
. $ShowTime
. '<span class="info set" data-id="' . $component['STATE'] . '" data-component="' . $component['component'] . '" data-datapoint="STATE" data-set-id="' . $component['STATE'] . '" data-button="' . $component['button'] . '" data-set-value=""></span>'
. '</div>'
. '</div>';
}
}
18 changes: 18 additions & 0 deletions components/HmIP-WHS2.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

function HmIP_WHS2($component) {

if(!isset($component['button'])) {
$component['button'] = 'switch';
}

if ($component['parent_device_interface'] == 'HmIP-RF' && $component['visible'] == 'true' && isset($component['STATE'])) {
if (!isset($component['color'])) $component['color'] = '#FFCC00';
return '<div class="hh" style=\'border-left-color: '.$component['color'].'; border-left-style: solid;\'>'
. '<div class="pull-left"><img src="icon/' . $component["icon"] . '" class="icon">' . $component['name'] . '</div>'
. '<div class="pull-right">'
. '<span class="info set" data-id="' . $component['STATE'] . '" data-component="' . $component['component'] . '" data-datapoint="STATE" data-set-id="' . $component['STATE'] . '" data-button="' . $component['button'] . '" data-set-value=""></span>'
. '</div>'
. '</div>';
}
}
8 changes: 8 additions & 0 deletions config/mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@
"name": "HmIP-BS2",
"icon": "light_light_dim_100.png"
},
{
"name": "ELV-SH-BS2",
"icon": "light_light_dim_100.png"
},
{
"name": "HmIP-WHS2",
"icon": "control_switch_m_4.png"
},
{
"name": "HmIP-FSM",
"icon": "light_light_dim_100.png"
Expand Down
2 changes: 2 additions & 0 deletions js/script.js.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@
$('[data-id="' + ise_id + '"]').html("<img src='icon/red_dot.png'>");
}
break;
case 'ELV-SH-BS2':
case 'HMIP-PSM':
case 'HMIP-PS':
case 'HmIP-PSM-2':
Expand All @@ -153,6 +154,7 @@
case 'HmIPW-DRS4':
case 'HmIP-DRSI4':
case 'HmIP-FWI':
case 'HmIP-WHS2':
case 'HM-LC-Sw1-Ba-PCB':
case 'HM-LC-Sw1-DR':
case 'HM-LC-Sw1-FM':
Expand Down

0 comments on commit 70caec0

Please sign in to comment.