Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/translations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: translate

on:
workflow_dispatch:
push:
branches:
- beta

jobs:
auto-translate:
runs-on: ubuntu-latest
steps:
- uses: jeedom/jeetranslate@main
with:
deepl_api_key: ${{ secrets.DEEPL_API_KEY }}
include_empty_translation: false
target_languages: "en_US,es_ES,de_DE,it_IT,pt_PT"
use_core_translations: true
15 changes: 14 additions & 1 deletion core/class/ajaxSystem.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,22 @@ public function execute($_options = array()) {
}
} else if ($eqLogic->getConfiguration('type') == 'device') {
$command = array(
'command' => $this->getLogicalId(),
'command' => explode(" ", $this->getLogicalId())[0],
'deviceType' => $eqLogic->getConfiguration('device')
);
if($this->getConfiguration('AdditionalParam',null) != null){
$command['AdditionalParam'] = $this->getConfiguration('AdditionalParam',null);
}
if(!isset($command['command']) || $command['command'] == ''){
$command['command'] = $this->getLogicalId();
}
if(isset(explode(" ", $this->getLogicalId())[1]) && explode(" ", $this->getLogicalId())[1] != ""){
$command['additionalParam'] = array(
'additionalParamType' => 'CHANNELS',
'channels' => array("CHANNEL_".explode(" ", $this->getLogicalId())[1])
);
}
log::add('ajaxSystem','debug','Command send to ajax : '.json_encode($command));
ajaxSystem::request('/user/{userId}/hubs/' . $eqLogic->getConfiguration('hub_id') . '/devices/' . $eqLogic->getLogicalId() . '/command', $command, 'POST');
} else if ($eqLogic->getConfiguration('type') == 'group') {
if ($this->getLogicalId() == 'ARM') {
Expand Down
107 changes: 107 additions & 0 deletions core/config/devices/LightSwitchTwoChannelTwoWay.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"name" : "Interrupteur double va et vient",
"commands" : [
{
"name": "Etat 1",
"type": "info",
"subtype": "binary",
"isVisible": 0,
"isHistorized": 0,
"logicalId": "channelStatus_1"
},
{
"name": "Etat 2",
"type": "info",
"subtype": "binary",
"isVisible": 0,
"isHistorized": 0,
"logicalId": "channelStatus_2"
},
{
"name": "Source evenement",
"type": "info",
"subtype": "string",
"isVisible": 0,
"isHistorized": 0,
"logicalId": "sourceObjectName"
},
{
"name": "Evenement",
"type": "info",
"subtype": "string",
"isVisible": 0,
"isHistorized": 0,
"logicalId": "event"
},
{
"name": "Code evenement",
"type": "info",
"subtype": "string",
"isVisible": 0,
"isHistorized": 0,
"logicalId": "eventCode"
},
{
"name": "On 1",
"type": "action",
"subtype": "other",
"isVisible": 1,
"isHistorized": 0,
"logicalId": "SWITCH_ON 1",
"value" :"Etat 1",
"template":{
"dashboard" : "prise",
"mobile" : "prise"
},
"configuration" :{
"AdditionalParam" : {
"ChannelsAdditionalParam" : "CHANNEL_1"
}
}
},
{
"name": "Off 1",
"type": "action",
"subtype": "other",
"isVisible": 1,
"isHistorized": 0,
"logicalId": "SWITCH_OFF 1",
"value" :"Etat 1",
"template":{
"dashboard" : "prise",
"mobile" : "prise"
},
"configuration" :{
"AdditionalParam" : {
"ChannelsAdditionalParam" : "CHANNEL_1"
}
}
},
{
"name": "On 2",
"type": "action",
"subtype": "other",
"isVisible": 1,
"isHistorized": 0,
"logicalId": "SWITCH_ON 2",
"value" :"Etat 2",
"template":{
"dashboard" : "prise",
"mobile" : "prise"
}
},
{
"name": "Off 2",
"type": "action",
"subtype": "other",
"isVisible": 1,
"isHistorized": 0,
"logicalId": "SWITCH_OFF 2",
"value" :"Etat 2",
"template":{
"dashboard" : "prise",
"mobile" : "prise"
}
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 107 additions & 0 deletions core/config/devices/LightSwitchTwoGang.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"name" : "Interrupteur double",
"commands" : [
{
"name": "Etat 1",
"type": "info",
"subtype": "binary",
"isVisible": 0,
"isHistorized": 0,
"logicalId": "channelStatus_1"
},
{
"name": "Etat 2",
"type": "info",
"subtype": "binary",
"isVisible": 0,
"isHistorized": 0,
"logicalId": "channelStatus_2"
},
{
"name": "Source evenement",
"type": "info",
"subtype": "string",
"isVisible": 0,
"isHistorized": 0,
"logicalId": "sourceObjectName"
},
{
"name": "Evenement",
"type": "info",
"subtype": "string",
"isVisible": 0,
"isHistorized": 0,
"logicalId": "event"
},
{
"name": "Code evenement",
"type": "info",
"subtype": "string",
"isVisible": 0,
"isHistorized": 0,
"logicalId": "eventCode"
},
{
"name": "On 1",
"type": "action",
"subtype": "other",
"isVisible": 1,
"isHistorized": 0,
"logicalId": "SWITCH_ON 1",
"value" :"Etat 1",
"template":{
"dashboard" : "prise",
"mobile" : "prise"
},
"configuration" :{
"AdditionalParam" : {
"ChannelsAdditionalParam" : "CHANNEL_1"
}
}
},
{
"name": "Off 1",
"type": "action",
"subtype": "other",
"isVisible": 1,
"isHistorized": 0,
"logicalId": "SWITCH_OFF 1",
"value" :"Etat 1",
"template":{
"dashboard" : "prise",
"mobile" : "prise"
},
"configuration" :{
"AdditionalParam" : {
"ChannelsAdditionalParam" : "CHANNEL_1"
}
}
},
{
"name": "On 2",
"type": "action",
"subtype": "other",
"isVisible": 1,
"isHistorized": 0,
"logicalId": "SWITCH_ON 2",
"value" :"Etat 2",
"template":{
"dashboard" : "prise",
"mobile" : "prise"
}
},
{
"name": "Off 2",
"type": "action",
"subtype": "other",
"isVisible": 1,
"isHistorized": 0,
"logicalId": "SWITCH_OFF 2",
"value" :"Etat 2",
"template":{
"dashboard" : "prise",
"mobile" : "prise"
}
}
]
}
Binary file added core/config/devices/LightSwitchTwoGang.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion core/config/devices/LightSwitchTwoWay.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@
}
}
]
}
}
Loading
Loading