Skip to content

Commit

Permalink
Merge branch 'main' into entity-name-translations
Browse files Browse the repository at this point in the history
  • Loading branch information
dougiteixeira authored Jul 20, 2023
2 parents aa70874 + c3bd2fa commit ca1ee86
Show file tree
Hide file tree
Showing 16 changed files with 1,610 additions and 969 deletions.
61 changes: 34 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,44 +11,51 @@ After configuring this integration, the following information is available:

![image](https://user-images.githubusercontent.com/31328123/189549962-1b195b2c-a5b8-40eb-947e-74052543d804.png)

## Installation
## Install

### If you use [HACS](https://hacs.xyz/):
### Installation via HACS

1. Click on HACS in the Home Assistant menu
2. Click on the 3 dots in the top right corner.
3. Select "Custom repositories"
4. Add the URL to the repository.
5. Select the Integration category.
6. Click the "ADD" button.
Have [HACS](https://hacs.xyz/) installed, this will allow you to update easily.

7. Click on HACS in the Home Assistant menu
8. Click on `Integrations`
9. Click the `EXPLORE & DOWNLOAD REPOSITORIES` button
10. Search for `Proxmox VE`
11. Click the `DOWNLOAD` button
12. Restart Home Assistant
* Adding Proxmox VE to HACS can be using this button:

### Manually:
[![image](https://my.home-assistant.io/badges/hacs_repository.svg)](https://my.home-assistant.io/redirect/hacs_repository/?owner=dougiteixeira&repository=proxmoxve&category=integration)

1. Copy `proxmoxve` folder from [latest release](https://github.com/dougiteixeira/proxmoxve/releases/latest) to [`custom_components` folder](https://developers.home-assistant.io/docs/creating_integration_file_structure/#where-home-assistant-looks-for-integrations). in your config folder.
2. Restart Home Assistant
(If the button above doesn't work, add `https://github.com/dougiteixeira/proxmoxve` as a custom repository of type Integration in HACS.)
* Click Install on the `Proxmox VE` integration.
* Restart the Home Assistant.

### Manual installation

- Copy `proxmoxve` folder from [latest release](https://github.com/dougiteixeira/proxmoxve/releases/latest) to [`custom_components` folder](https://developers.home-assistant.io/docs/creating_integration_file_structure/#where-home-assistant-looks-for-integrations) in your config directory.
- Restart the Home Assistant.

## Configuration

Adding Proxmox VE to your Home Assistant instance can be done via the user interface, by using this My button:
Adding Proxmox VE to your Home Assistant instance can be done via the UI using this button:

[![image](https://my.home-assistant.io/badges/config_flow_start.svg)](https://my.home-assistant.io/redirect/config_flow_start?domain=proxmoxve)

### Manual Configuration

If the button above doesn't work, you can also perform the following steps manually:

[![image](https://user-images.githubusercontent.com/31328123/189550000-6095719b-ca38-4860-b817-926b19de1b32.png)](https://my.home-assistant.io/redirect/config_flow_start?domain=proxmoxve)
* Navigate to your Home Assistant instance.
* In the sidebar, click Settings.
* From the Setup menu, select: Devices & Services.
* In the lower right corner, click the Add integration button.
* In the list, search and select `Proxmox VE`.
* Follow the on-screen instructions to complete the setup.

### Manual configuration steps
If the above My button doesn’t work, you can also perform the following steps manually:
## Debugging

* Browse to your Home Assistant instance.
* In the sidebar click on Settings.
* From the configuration menu select: Devices & Services.
* In the bottom right, click on the Add Integration button.
* From the list, search and select “Proxmox VE”.
* Follow the instruction on screen to complete the set up.
To enable debug for Proxmox VE integration, add following to your `configuration.yaml`:
```yaml
logger:
default: info
logs:
custom_components.proxmoxve: debug
```
## Proxmox Permissions
Expand Down
48 changes: 48 additions & 0 deletions blueprints/readme.md
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)

50 changes: 50 additions & 0 deletions blueprints/reload_config_entry_auto.yaml
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
Loading

0 comments on commit ca1ee86

Please sign in to comment.