diff --git a/packages/coche_electrico.yaml b/packages/sensor/consumo_coche_electrico.yaml similarity index 55% rename from packages/coche_electrico.yaml rename to packages/sensor/consumo_coche_electrico.yaml index 6b69780..7e74907 100644 --- a/packages/coche_electrico.yaml +++ b/packages/sensor/consumo_coche_electrico.yaml @@ -1,15 +1,3 @@ -switch: - - platform: rest - name: "Coche Eléctrico" - scan_interval: 30 - resource: http://10.10.1.153/relay/3 - body_on: 'turn=on' - body_off: 'turn=off' - timeout : 60 - is_on_template: '{{ value_json.ison == true}}' - headers: - content-type: application/x-www-form-urlencoded - sensor: - platform: mqtt name: "Consumo General Coche Eléctrico" @@ -21,4 +9,3 @@ sensor: state_topic: "shellies/shelly4pro-061E6E/relay/3/energy" unit_of_measurement: "KWh" value_template: "{{ value | multiply(0.01) | float | round(2)}}" - diff --git a/packages/general_caldera.yaml b/packages/sensor/consumo_general.caldera.yaml similarity index 55% rename from packages/general_caldera.yaml rename to packages/sensor/consumo_general.caldera.yaml index efded77..f5f3642 100644 --- a/packages/general_caldera.yaml +++ b/packages/sensor/consumo_general.caldera.yaml @@ -1,15 +1,3 @@ -switch: - - platform: rest - name: "General Caldera" - scan_interval: 30 - resource: http://10.10.1.153/relay/2 - body_on: 'turn=on' - body_off: 'turn=off' - timeout : 60 - is_on_template: '{{ value_json.ison == true}}' - headers: - content-type: application/x-www-form-urlencoded - sensor: - platform: mqtt name: "Consumo General Calefacción" @@ -21,4 +9,3 @@ sensor: state_topic: "shellies/shelly4pro-061E6E/relay/2/energy" unit_of_measurement: "KWh" value_template: "{{ value | multiply(0.01) | float | round(2)}}" - diff --git a/packages/general_luces.yaml b/packages/sensor/consumo_general_luces.yaml similarity index 54% rename from packages/general_luces.yaml rename to packages/sensor/consumo_general_luces.yaml index b808f45..af8c01c 100644 --- a/packages/general_luces.yaml +++ b/packages/sensor/consumo_general_luces.yaml @@ -1,15 +1,3 @@ -switch: - - platform: rest - name: "General Luces" - scan_interval: 30 - resource: http://10.10.1.153/relay/0 - body_on: 'turn=on' - body_off: 'turn=off' - timeout: 60 - is_on_template: '{{ value_json.ison == true}}' - headers: - content-type: application/x-www-form-urlencoded - sensor: - platform: mqtt name: "Consumo General Luces" @@ -21,4 +9,3 @@ sensor: state_topic: "shellies/shelly4pro-061E6E/relay/0/energy" unit_of_measurement: "KWh" value_template: "{{ value | multiply(0.01) | float | round(2)}}" - diff --git a/packages/general_persianas.yaml b/packages/sensor/consumo_general_persianas.yaml similarity index 54% rename from packages/general_persianas.yaml rename to packages/sensor/consumo_general_persianas.yaml index 8486aed..203ef25 100644 --- a/packages/general_persianas.yaml +++ b/packages/sensor/consumo_general_persianas.yaml @@ -1,15 +1,3 @@ -switch: - - platform: rest - name: "General Persianas" - scan_interval: 30 - resource: http://10.10.1.153/relay/1 - body_on: 'turn=on' - body_off: 'turn=off' - timeout : 60 - is_on_template: '{{ value_json.ison == true}}' - headers: - content-type: application/x-www-form-urlencoded - sensor: - platform: mqtt name: "Consumo General Persianas" @@ -21,4 +9,3 @@ sensor: state_topic: "shellies/shelly4pro-061E6E/relay/1/energy" unit_of_measurement: "KWh" value_template: "{{ value | multiply(0.01) | float | round(2)}}" - diff --git a/packages/switch/general_caldera.yaml b/packages/switch/general_caldera.yaml new file mode 100644 index 0000000..b719afe --- /dev/null +++ b/packages/switch/general_caldera.yaml @@ -0,0 +1,11 @@ +switch: + - platform: rest + name: "General Caldera" + scan_interval: 30 + resource: http://10.10.1.153/relay/2 + body_on: 'turn=on' + body_off: 'turn=off' + timeout : 60 + is_on_template: '{{ value_json.ison == true}}' + headers: + content-type: application/x-www-form-urlencoded diff --git a/packages/switch/general_coche_electrico.yaml b/packages/switch/general_coche_electrico.yaml new file mode 100644 index 0000000..9118c65 --- /dev/null +++ b/packages/switch/general_coche_electrico.yaml @@ -0,0 +1,11 @@ +switch: + - platform: rest + name: "Coche Eléctrico" + scan_interval: 30 + resource: http://10.10.1.153/relay/3 + body_on: 'turn=on' + body_off: 'turn=off' + timeout : 60 + is_on_template: '{{ value_json.ison == true}}' + headers: + content-type: application/x-www-form-urlencoded diff --git a/packages/switch/general_luces.yaml b/packages/switch/general_luces.yaml new file mode 100644 index 0000000..8f8ff99 --- /dev/null +++ b/packages/switch/general_luces.yaml @@ -0,0 +1,12 @@ +switch: + - platform: rest + name: "General Luces" + scan_interval: 30 + resource: http://10.10.1.153/relay/0 + body_on: 'turn=on' + body_off: 'turn=off' + timeout: 60 + is_on_template: '{{ value_json.ison == true}}' + headers: + content-type: application/x-www-form-urlencoded + diff --git a/packages/switch/general_persianas.yaml b/packages/switch/general_persianas.yaml new file mode 100644 index 0000000..dbe7b2d --- /dev/null +++ b/packages/switch/general_persianas.yaml @@ -0,0 +1,11 @@ +switch: + - platform: rest + name: "General Persianas" + scan_interval: 30 + resource: http://10.10.1.153/relay/1 + body_on: 'turn=on' + body_off: 'turn=off' + timeout : 60 + is_on_template: '{{ value_json.ison == true}}' + headers: + content-type: application/x-www-form-urlencoded