From 46ebda6455018260153bf4abc27c3f024efea635 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Mon, 2 May 2022 15:08:24 +0200 Subject: [PATCH] Add ups automations --- configuration/automations/ups.yaml | 97 ++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 configuration/automations/ups.yaml diff --git a/configuration/automations/ups.yaml b/configuration/automations/ups.yaml new file mode 100644 index 0000000..89ce1be --- /dev/null +++ b/configuration/automations/ups.yaml @@ -0,0 +1,97 @@ +- id: ups-discharging + alias: '[UPS] Discharging' + mode: single + trigger: + - platform: state + entity_id: sensor.myups_status_data + to: OB DISCHRG + condition: [ ] + action: + - service: notify.mobile_app_iphone_pg + data: + title: "UPS Alert" + message: UPS started discharging + +- id: ups-charging + alias: '[UPS] Charging' + mode: single + trigger: + - platform: state + entity_id: sensor.myups_status_data + to: OL CHRG + condition: [ ] + action: + - service: notify.mobile_app_iphone_pg + data: + title: "UPS Alert" + message: UPS is charging + +- id: ups-lost-power + alias: '[UPS] Lost power' + mode: single + trigger: + - platform: state + entity_id: sensor.myups_input_voltage + to: '0' + condition: [ ] + action: + - service: notify.mobile_app_iphone_pg + data: + title: "UPS Alert" + message: UPS lost power + +- id: ups-power-back + alias: '[UPS] Power back' + mode: single + trigger: + - platform: numeric_state + entity_id: sensor.myups_input_voltage + above: '200' + condition: [ ] + action: + - service: notify.mobile_app_iphone_pg + data: + title: "UPS Alert" + message: UPS power is back + +- id: ups-battery-under-100 + alias: '[UPS] Power back' + mode: single + trigger: + - platform: numeric_state + entity_id: sensor.myups_battery_charge + below: '100' + condition: [ ] + action: + - service: notify.mobile_app_iphone_pg + data: + title: "UPS Alert" + message: UPS battery is below 100%, estimated time on battery 25 min + +- id: ups-battery-under-50 + alias: '[UPS] Power back' + mode: single + trigger: + - platform: numeric_state + entity_id: sensor.myups_battery_charge + below: '50' + condition: [ ] + action: + - service: notify.mobile_app_iphone_pg + data: + title: "UPS Alert" + message: UPS battery is below 50%, estimated time on battery 12 min + +- id: ups-battery-under-10 + alias: '[UPS] Power back' + mode: single + trigger: + - platform: numeric_state + entity_id: sensor.myups_battery_charge + below: '10' + condition: [ ] + action: + - service: notify.mobile_app_iphone_pg + data: + title: "UPS Alert" + message: UPS battery is below 10%, estimated time on battery 2 min