Skip to content

Commit

Permalink
Fix Style
Browse files Browse the repository at this point in the history
  • Loading branch information
Schnittcher committed Aug 3, 2024
1 parent 537a890 commit bc70448
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 28 deletions.
38 changes: 19 additions & 19 deletions ShellyEM/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@
class ShellyEM extends ShellyModule
{
public static $Variables = [
['Shelly_State', 'State', VARIABLETYPE_BOOLEAN, '~Switch', [], '', true, true,false],
['Shelly_State', 'State', VARIABLETYPE_BOOLEAN, '~Switch', [], '', true, true, false],

['Shelly_Power0', 'Power L1', VARIABLETYPE_FLOAT, '~Watt.3680', [], '', false, true,false],
['Shelly_Energy0', 'Energy L1', VARIABLETYPE_FLOAT, '~Electricity', [], '', false, true,false],
['Shelly_ReturnedEnergy0', 'Returned Energy L1', VARIABLETYPE_FLOAT, '~Electricity', [], '', false, true,false],
['Shelly_ReactivePower0', 'Reactive Power', VARIABLETYPE_FLOAT, '~Watt.3680', [], '', false, true,false],
['Shelly_Voltage0', 'Voltage L1', VARIABLETYPE_FLOAT, '~Volt', [], '', false, true,false],
['Shelly_Total0', 'Total L1', VARIABLETYPE_FLOAT, '~Electricity', [], '', false, true,false],
['Shelly_TotalReturned0', 'Total Returned L1', VARIABLETYPE_FLOAT, '~Electricity', [], '', false, true,false],
['Shelly_Power0', 'Power L1', VARIABLETYPE_FLOAT, '~Watt.3680', [], '', false, true, false],
['Shelly_Energy0', 'Energy L1', VARIABLETYPE_FLOAT, '~Electricity', [], '', false, true, false],
['Shelly_ReturnedEnergy0', 'Returned Energy L1', VARIABLETYPE_FLOAT, '~Electricity', [], '', false, true, false],
['Shelly_ReactivePower0', 'Reactive Power', VARIABLETYPE_FLOAT, '~Watt.3680', [], '', false, true, false],
['Shelly_Voltage0', 'Voltage L1', VARIABLETYPE_FLOAT, '~Volt', [], '', false, true, false],
['Shelly_Total0', 'Total L1', VARIABLETYPE_FLOAT, '~Electricity', [], '', false, true, false],
['Shelly_TotalReturned0', 'Total Returned L1', VARIABLETYPE_FLOAT, '~Electricity', [], '', false, true, false],

['Shelly_Power1', 'Power L2', VARIABLETYPE_FLOAT, '~Watt.3680', [], '', false, true,false],
['Shelly_Energy1', 'Energy L2', VARIABLETYPE_FLOAT, '~Electricity', [], '', false, true,false],
['Shelly_ReturnedEnergy1', 'Returned Energy L2', VARIABLETYPE_FLOAT, '~Electricity', [], '', false, true,false],
['Shelly_ReactivePower1', 'Reactive Power L2', VARIABLETYPE_FLOAT, '~Watt.3680', [], '', false, true,false],
['Shelly_Voltage1', 'Voltage L2', VARIABLETYPE_FLOAT, '~Volt', [], '', false, true,false],
['Shelly_Total1', 'Total L2', VARIABLETYPE_FLOAT, '~Electricity', [], '', false, true,false],
['Shelly_TotalReturned1', 'Total Returned L2', VARIABLETYPE_FLOAT, '~Electricity', [], '', false, true,false],
['Shelly_Power1', 'Power L2', VARIABLETYPE_FLOAT, '~Watt.3680', [], '', false, true, false],
['Shelly_Energy1', 'Energy L2', VARIABLETYPE_FLOAT, '~Electricity', [], '', false, true, false],
['Shelly_ReturnedEnergy1', 'Returned Energy L2', VARIABLETYPE_FLOAT, '~Electricity', [], '', false, true, false],
['Shelly_ReactivePower1', 'Reactive Power L2', VARIABLETYPE_FLOAT, '~Watt.3680', [], '', false, true, false],
['Shelly_Voltage1', 'Voltage L2', VARIABLETYPE_FLOAT, '~Volt', [], '', false, true, false],
['Shelly_Total1', 'Total L2', VARIABLETYPE_FLOAT, '~Electricity', [], '', false, true, false],
['Shelly_TotalReturned1', 'Total Returned L2', VARIABLETYPE_FLOAT, '~Electricity', [], '', false, true, false],

['Shelly_Voltage0', 'Voltage L1', VARIABLETYPE_FLOAT, '~Volt', [], '', false, true,false],
['Shelly_Total0', 'Total L1', VARIABLETYPE_FLOAT, '~Electricity', [], '', false, true,false],
['Shelly_TotalReturned0', 'Total Returned L1', VARIABLETYPE_FLOAT, '~Electricity', [], '', false, true,false],
['Shelly_Reachable', 'Reachable', VARIABLETYPE_BOOLEAN, 'Shelly.Reachable', '', '', false, true,false]
['Shelly_Voltage0', 'Voltage L1', VARIABLETYPE_FLOAT, '~Volt', [], '', false, true, false],
['Shelly_Total0', 'Total L1', VARIABLETYPE_FLOAT, '~Electricity', [], '', false, true, false],
['Shelly_TotalReturned0', 'Total Returned L1', VARIABLETYPE_FLOAT, '~Electricity', [], '', false, true, false],
['Shelly_Reachable', 'Reachable', VARIABLETYPE_BOOLEAN, 'Shelly.Reachable', '', '', false, true, false]
];

public function RequestAction($Ident, $Value)
Expand Down
1 change: 0 additions & 1 deletion ShellyPro3EM/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ public function ReceiveData($JSONString)
}
if (fnmatch('*/events/rpc', $Buffer['Topic'])) {
if (array_key_exists('params', $Payload)) {

if (array_key_exists('switch:100', $Payload['params'])) {
$switch = $Payload['params']['switch:100'];
if (array_key_exists('output', $switch)) {
Expand Down
16 changes: 8 additions & 8 deletions Shellyi3/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
class Shellyi3 extends ShellyModule
{
public static $Variables = [
['Shelly_Input0', 'Input 1', VARIABLETYPE_BOOLEAN, '~Switch', [], '', false, true,false],
['Shelly_Input1', 'Input 2', VARIABLETYPE_BOOLEAN, '~Switch', [], '', false, true,false],
['Shelly_Input2', 'Input 3', VARIABLETYPE_BOOLEAN, '~Switch', [], '', false, true,false],
['Shelly_InputEvent0', 'Input 1 Event', VARIABLETYPE_INTEGER, 'Shelly.i3Input', [], '', false, true,false],
['Shelly_InputEvent1', 'Input 2 Event', VARIABLETYPE_INTEGER, 'Shelly.i3Input', [], '', false, true,false],
['Shelly_InputEvent2', 'Input 3 Event', VARIABLETYPE_INTEGER, 'Shelly.i3Input', [], '', false, true,false],
['Shelly_Reachable', 'Reachable', VARIABLETYPE_BOOLEAN, 'Shelly.Reachable', [], '', false, true,false]
['Shelly_Input0', 'Input 1', VARIABLETYPE_BOOLEAN, '~Switch', [], '', false, true, false],
['Shelly_Input1', 'Input 2', VARIABLETYPE_BOOLEAN, '~Switch', [], '', false, true, false],
['Shelly_Input2', 'Input 3', VARIABLETYPE_BOOLEAN, '~Switch', [], '', false, true, false],
['Shelly_InputEvent0', 'Input 1 Event', VARIABLETYPE_INTEGER, 'Shelly.i3Input', [], '', false, true, false],
['Shelly_InputEvent1', 'Input 2 Event', VARIABLETYPE_INTEGER, 'Shelly.i3Input', [], '', false, true, false],
['Shelly_InputEvent2', 'Input 3 Event', VARIABLETYPE_INTEGER, 'Shelly.i3Input', [], '', false, true, false],
['Shelly_Reachable', 'Reachable', VARIABLETYPE_BOOLEAN, 'Shelly.Reachable', [], '', false, true, false]
];

public function Create()
Expand Down Expand Up @@ -91,7 +91,7 @@ public function ReceiveData($JSONString)
break;
case 'false':
$this->SetValue('Shelly_Reachable', false);
$this->zeroingValues();
$this->zeroingValues();
break;
}
}
Expand Down

0 comments on commit bc70448

Please sign in to comment.