diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2023-01-24 06:27:43 +0400 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2023-01-24 06:27:43 +0400 |
commit | c933cb78aa1d235e8edffbe2a9d964acad20cfe3 (patch) | |
tree | 8ced5a7f36a0df84c29dc51e37f1043b06b3ac73 | |
parent | 614c8a5f4e3bf26d3af0a91685e00eecb171339b (diff) | |
download | hass-c933cb78aa1d235e8edffbe2a9d964acad20cfe3.tar.gz hass-c933cb78aa1d235e8edffbe2a9d964acad20cfe3.tar.bz2 hass-c933cb78aa1d235e8edffbe2a9d964acad20cfe3.tar.xz hass-c933cb78aa1d235e8edffbe2a9d964acad20cfe3.zip |
Monitor primary/backup connectivity and inform when we are on LTE
-rw-r--r-- | .storage/lovelace.lovelace_status | 44 | ||||
-rw-r--r-- | automations.yaml | 65 | ||||
-rw-r--r-- | blueprints/automation/motion/halabyan24.yaml | 43 | ||||
-rw-r--r-- | custom/binary_sensor.yaml | 11 |
4 files changed, 139 insertions, 24 deletions
diff --git a/.storage/lovelace.lovelace_status b/.storage/lovelace.lovelace_status index aad7bd1..1cfbb25 100644 --- a/.storage/lovelace.lovelace_status +++ b/.storage/lovelace.lovelace_status @@ -14,6 +14,35 @@ { "type": "custom:restriction-card", "restrictions": { + "confirm": { + "exemptions": null + } + }, + "card": { + "type": "entities", + "entities": [ + { + "entity": "input_boolean.mode_away", + "name": "Away/Security" + }, + { + "entity": "switch.hall_lights_center", + "name": "Camera" + }, + { + "entity": "binary_sensor.network_route_crd", + "name": "CRD net" + }, + { + "entity": "binary_sensor.network_route_vivacell", + "name": "LTE net" + } + ] + } + }, + { + "type": "custom:restriction-card", + "restrictions": { "block": { "exemptions": null } @@ -104,6 +133,21 @@ "name": "Hall" } ] + }, + { + "type": "history-graph", + "title": "Networks (8 hours)", + "hours_to_show": 8, + "entities": [ + { + "entity": "binary_sensor.network_route_crd", + "name": "CRD" + }, + { + "entity": "binary_sensor.network_route_vivacell", + "name": "LTE" + } + ] } ] }, diff --git a/automations.yaml b/automations.yaml index efe9950..4446daf 100644 --- a/automations.yaml +++ b/automations.yaml @@ -702,25 +702,40 @@ on_click: - if: - condition: state - entity_id: switch.smart_power_strip_pro_socket_1 - state: 'off' + entity_id: switch.living_tablelamp + state: 'on' then: - - parallel: - - service: script.sleep_and_wake - data: - mode: wake - target: office - - if: - - condition: numeric_state - entity_id: sun.sun - attribute: elevation - below: '5' - then: - - service: script.turn_on_office_lights - data: {} + - type: turn_off + device_id: 32787706a8ff87380633b7c817057935 + entity_id: switch.living_tablelamp + domain: switch else: - - service: script.turn_on_office_lights - data: {} + - if: + - condition: state + entity_id: switch.smart_power_strip_pro_socket_1 + state: 'off' + then: + - parallel: + - service: script.sleep_and_wake + data: + mode: wake + target: office + - if: + - condition: numeric_state + entity_id: sun.sun + attribute: elevation + below: '5' + then: + - service: script.turn_on_office_lights + data: {} + else: + - service: script.turn_on_office_lights + data: {} + off_click: + - type: turn_on + device_id: 32787706a8ff87380633b7c817057935 + entity_id: switch.living_tablelamp + domain: switch dblclick: - if: - condition: state @@ -1109,7 +1124,7 @@ entity_id: switch.bathroom_lights_left domain: switch reentry_wait: 5 - reentry_timeout: 30 + reentry_timeout: 45 - id: '1674140368136' alias: 'Office: Sven Scene Switch' description: '' @@ -1158,3 +1173,17 @@ entity_id: switch.living_tablelamp domain: switch default: [] +- id: '1674510035217' + alias: 'Network: Backup' + description: '' + trigger: + - platform: state + entity_id: + - binary_sensor.network_route_vivacell + to: 'on' + condition: [] + action: + - service: notify.notify + data: + message: Connected via Vivacell + mode: single diff --git a/blueprints/automation/motion/halabyan24.yaml b/blueprints/automation/motion/halabyan24.yaml index e06c26d..03f4ff3 100644 --- a/blueprints/automation/motion/halabyan24.yaml +++ b/blueprints/automation/motion/halabyan24.yaml @@ -37,10 +37,21 @@ trigger: to: HomeHalabyanExtended for: hours: 0 - minutes: 5 + minutes: 4 seconds: 0 -# We get away from home area + - platform: state + id: around_home2 + entity_id: + - device_tracker.lm_g810 + from: not_home + to: home + for: + hours: 0 + minutes: 2 + seconds: 0 + +# We get away from home area (or directly from home) - platform: state id: away_from_home entity_id: @@ -52,6 +63,18 @@ trigger: minutes: 0 seconds: 0 + - platform: state + id: away_from_home2 + entity_id: + - device_tracker.lm_g810 + from: home + to: not_home + for: + hours: 1 + minutes: 0 + seconds: 0 + + # No motions in the hall for a day - platform: state entity_id: binary_sensor.hall_motions_occupancy @@ -109,8 +132,12 @@ action: id: empty_day - condition: and conditions: - - condition: trigger - id: away_from_home + - condition: or + conditions: + - condition: trigger + id: away_from_home + - condition: trigger + id: away_from_home2 - condition: state entity_id: input_boolean.mode_house_sleep state: 'on' @@ -167,8 +194,12 @@ action: # Disable 'away' security mode if our phone is in vicinity - conditions: - - condition: trigger - id: around_home + - condition: or + conditions: + - condition: trigger + id: around_home + - condition: trigger + id: around_home2 sequence: - service: switch.turn_off data: {} diff --git a/custom/binary_sensor.yaml b/custom/binary_sensor.yaml index 350a40f..08232b4 100644 --- a/custom/binary_sensor.yaml +++ b/custom/binary_sensor.yaml @@ -1 +1,12 @@ #binary_sensor: + - platform: ping + host: 192.168.0.1 + name: "network_route/crd" + count: 1 + scan_interval: 300 + + - platform: ping + host: 192.168.1.1 + name: "network_route/vivacell" + count: 1 + scan_interval: 300 |