-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into entity-name-translations
- Loading branch information
Showing
16 changed files
with
1,610 additions
and
969 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Blueprints | ||
|
||
Here you will find some blueprints that help you to solve small integration bugs: | ||
|
||
## When the integration does not recover after the host goes offline for an extended period of time and then comes back online: | ||
|
||
How it works is to verify that the Proxmox node status sensor is running when the Proxmox host connectivity sensor is changed from Disconnected (`off`) to Connected (`on`). If the status sensor is `unavailable` the integration reload will be triggered. | ||
To avoid unnecessary reloads, a time of 1 minute is waited after the host goes online to execute the automation. | ||
|
||
### Previous steps: | ||
|
||
To use this blueprint you need to create a binary sensor in your Home Assistant using the Ping integration ([see documentation here](https://www.home-assistant.io/integrations/ping/#binary-sensor)), follow the steps below: | ||
|
||
* Include the code below in your configuration file (`configuration.yaml`): | ||
``` | ||
binary_sensor: | ||
- platform: ping | ||
host: 10.10.10.10 # Change to the IP address of your Proxmox host | ||
name: Proxmox host connectivity | ||
count: 2 | ||
scan_interval: 30 | ||
``` | ||
* Change to the IP address of your Proxmox host in the file. | ||
* Save the file. | ||
* Restart Home Assistant. | ||
|
||
### Importing via My Home Assistant: | ||
* Click this button to import: | ||
|
||
[![Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.](https://my.home-assistant.io/badges/blueprint_import.svg)](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https://github.com/dougiteixeira/proxmoxve/blob/main/blueprints/reload_config_entry_auto.yaml) | ||
|
||
#### Or do the import manually: | ||
|
||
* Go to [Settings > Automations & Scenes > Blueprints](https://my.home-assistant.io/redirect/blueprints/). | ||
* Select the blue Import Blueprint button in the bottom right. | ||
* A new dialog will pop-up asking you for the URL. | ||
* Enter the URL `https://github.com/dougiteixeira/proxmoxve/blob/main/blueprints/reload_config_entry_auto.yaml` and select Preview. | ||
* This will load the blueprint and show a preview in the import dialog. | ||
* You can change the name and finish the import. | ||
* The blueprint can now be used for creating automations. | ||
|
||
### Adding automation via blueprint: | ||
|
||
* Go to [Settings > Automations & Scenes > Blueprints](https://my.home-assistant.io/redirect/blueprints/). | ||
* Click on the imported blueprint (Proxmox - Reload Config Entry) | ||
* Select Proxmox host connectivity entity (binary sensor created with Ping integration) | ||
* Select Proxmox node status entity (Binary sensor Status node) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
blueprint: | ||
name: Proxmox - Reload Config Entry | ||
description: "" | ||
domain: automation | ||
source_url: https://github.com/dougiteixeira/proxmoxve/blob/main/blueprints/reload_config_entry_auto.yaml | ||
input: | ||
proxmox_host_status: | ||
name: Host status | ||
description: Select the Proxmox host connectivity entity ([see details at here](https://github.com/dougiteixeira/proxmoxve/blob/main/blueprints/readme.md#previous-steps)) | ||
selector: | ||
entity: | ||
multiple: false | ||
filter: | ||
integration: ping | ||
domain: binary_sensor | ||
device_class: connectivity | ||
proxmox_node_status: | ||
name: Proxmox node status | ||
description: Select the Proxmox node status entity | ||
selector: | ||
entity: | ||
multiple: false | ||
filter: | ||
integration: proxmoxve | ||
domain: binary_sensor | ||
device_class: running | ||
trigger: | ||
- platform: state | ||
entity_id: | ||
- !input 'proxmox_host_status' | ||
from: "off" | ||
to: "on" | ||
for: | ||
hours: 0 | ||
minutes: 1 | ||
seconds: 0 | ||
|
||
condition: | ||
- condition: state | ||
entity_id: !input 'proxmox_node_status' | ||
state: unavailable | ||
|
||
action: | ||
- service: homeassistant.reload_config_entry | ||
data: {} | ||
target: | ||
entity_id: !input 'proxmox_node_status' | ||
|
||
mode: queued | ||
max_exceeded: silent |
Oops, something went wrong.