mirror of
https://github.com/Burningstone91/smart-home-setup.git
synced 2022-05-05 21:16:50 +03:00
Finished device tracker view and replaced own update sensor with sensor provided by Synology DSM integration
This commit is contained in:
21
README.md
21
README.md
@@ -2488,7 +2488,7 @@ Add the following in the `sensor:` section of the system_monitoring.yaml file (e
|
||||
To monitor the Synology NAS we can use the [Synology DSM integration](https://www.home-assistant.io/integrations/synology_dsm/). In Home Assistant on the sidebar click on "Configuration" then on "Integrations". Click on the orange plus in the bottom right corner, search for "Synology DSM" and click on it. In the host field enter the IP of your NAS, fill in the username and password to log into the NAS and press Submit. You should now have sensors for the disk temperature, disk size, cpu load etc.
|
||||
|
||||
#### Model and Firmware
|
||||
To get the model, current firmware and whether an update is available we can use the [SNMP integration](https://www.home-assistant.io/integrations/snmp/). First you need to enable SNMP on the NAS. Login to the Web Interface of the NAS, go to "Control Panel" and then choose "Terminal & SNMP". Go to the tab "SNMP" and enable the SNMP Service.
|
||||
To get the model and current firmware we can use the [SNMP integration](https://www.home-assistant.io/integrations/snmp/). First you need to enable SNMP on the NAS. Login to the Web Interface of the NAS, go to "Control Panel" and then choose "Terminal & SNMP". Go to the tab "SNMP" and enable the SNMP Service.
|
||||
Add the following in the `sensor:` section of the system_monitoring.yaml file:\
|
||||
Model:
|
||||
```yaml
|
||||
@@ -2506,24 +2506,7 @@ Firmware:
|
||||
community: 'public'
|
||||
baseoid: 1.3.6.1.4.1.6574.1.5.3.0
|
||||
```
|
||||
Firmware Upgrade Available:
|
||||
```yaml
|
||||
- platform: snmp
|
||||
name: Firmware Upgrade NAS
|
||||
host: 10.10.40.15
|
||||
community: 'public'
|
||||
baseoid: 1.3.6.1.4.1.6574.1.5.4.0
|
||||
value_template: >
|
||||
{% set mapping = {
|
||||
'1': 'Upgrade available',
|
||||
'2': 'Up-to-date',
|
||||
'3': 'Unknown',
|
||||
'4': 'Unknown',
|
||||
'5': 'Unknown'
|
||||
} %}
|
||||
{{ mapping[value] if value in mapping else 'error' }}
|
||||
```
|
||||
This sensor will show "Upgrade Available", "Up-to-date" or "unknown" if the value can be read, otherwise it shows "error".
|
||||
The Synology DSM integration provides a binary_sensor that shows whether an update is available or not.
|
||||
|
||||
### Unifi Devices
|
||||
#### Unifi Controller
|
||||
|
||||
@@ -49,6 +49,8 @@ cards:
|
||||
10.10.0.1<br>
|
||||
**Firmware:**
|
||||
{{ states('sensor.firmware_usg') }}<br>
|
||||
**Updates**
|
||||
{{ 'Update available' if state_attr('device_tracker.usg_router', 'upgradable') == 'true' else 'Up-to-date' }}<br>
|
||||
**Uptime:**
|
||||
{{ states('sensor.uptime_usg') }}
|
||||
style: |
|
||||
@@ -150,12 +152,14 @@ cards:
|
||||
10.10.0.14<br>
|
||||
**Firmware:**
|
||||
{{ states('sensor.firmware_ap_livingroom') }}<br>
|
||||
**Updates:**
|
||||
{{ 'Update available' if state_attr('device_tracker.ap_livingroom', 'upgradable') == true else 'Up-to-date' }}<br>
|
||||
**Uptime:**
|
||||
{{ states('sensor.uptime_ap_livingroom') }}
|
||||
style: |
|
||||
ha-card {
|
||||
color: teal;
|
||||
padding-top: 20px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
####################################################
|
||||
# Switch Livingroom #
|
||||
@@ -186,12 +190,14 @@ cards:
|
||||
10.10.0.6<br>
|
||||
**Firmware:**
|
||||
{{ states('sensor.firmware_switch_livingroom') }}<br>
|
||||
**Updates:**
|
||||
{{ 'Update available' if state_attr('device_tracker.switch_livingroom', 'upgradable') == true else 'Up-to-date' }}<br>
|
||||
**Uptime:**
|
||||
{{ states('sensor.uptime_switch_livingroom') }}
|
||||
style: |
|
||||
ha-card {
|
||||
color: teal;
|
||||
padding-top: 20px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
####################################################
|
||||
# Switch Storageroom #
|
||||
@@ -222,12 +228,14 @@ cards:
|
||||
10.10.0.10<br>
|
||||
**Firmware:**
|
||||
{{ states('sensor.firmware_switch_storageroom') }}<br>
|
||||
**Updates:**
|
||||
{{ 'Update available' if state_attr('device_tracker.switch_storageroom', 'upgradable') == true else 'Up-to-date' }}<br>
|
||||
**Uptime:**
|
||||
{{ states('sensor.uptime_switch_storageroom') }}
|
||||
style: |
|
||||
ha-card {
|
||||
color: teal;
|
||||
padding-top: 20px;
|
||||
padding-top: 5px;
|
||||
}
|
||||
####################################################
|
||||
# #
|
||||
@@ -673,7 +681,7 @@ cards:
|
||||
**Firmware:**
|
||||
{{ states('sensor.firmware_nas') }}<br>
|
||||
**Updates:**
|
||||
{{ states('sensor.firmware_upgrade_nas') }}<br>
|
||||
{{ 'Update available' if states('binary_sensor.nas_update_available') == 'on' else 'Up-to-date' }}<br>
|
||||
**Uptime:**
|
||||
{{ states('sensor.uptime_nas') }}
|
||||
style: |
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,47 @@
|
||||
# lovelace_gen
|
||||
|
||||
# card
|
||||
type: custom:button-card
|
||||
entity: "{{ entity }}"
|
||||
size: "{{ size }}"
|
||||
name: "{{ name }}"
|
||||
label: "{{ label }}"
|
||||
show_name: true
|
||||
show_state: false
|
||||
show_label: true
|
||||
show_entity_picture: true
|
||||
entity_picture: "{{ entity_picture }}"
|
||||
styles:
|
||||
name:
|
||||
- font-size: 12px
|
||||
- color: teal
|
||||
label:
|
||||
- font-size: 12px
|
||||
- color: teal
|
||||
entity_picture:
|
||||
- margin-bottom: 7px
|
||||
state:
|
||||
- value: "home"
|
||||
styles:
|
||||
card:
|
||||
- --ha-card-background: 'rgba(255, 255, 255, 1.0)'
|
||||
- opacity: 1.0
|
||||
- box-shadow: none
|
||||
icon:
|
||||
- color: var(--paper-item-icon-active-color)
|
||||
- value: "not_home"
|
||||
styles:
|
||||
card:
|
||||
- opacity: 0.5
|
||||
state:
|
||||
- color: "Gray"
|
||||
name:
|
||||
- color: "Gray"
|
||||
- value: "unavailable"
|
||||
styles:
|
||||
card:
|
||||
- opacity: 0.4
|
||||
name:
|
||||
- color: red
|
||||
label:
|
||||
- color: red
|
||||
12
home-assistant/lovelace/templates/empty-button.yaml
Executable file
12
home-assistant/lovelace/templates/empty-button.yaml
Executable file
@@ -0,0 +1,12 @@
|
||||
# This is used as a spacer between the screen
|
||||
# edge (of a mobile device) and the card/button.
|
||||
# Use this to create a small gap so that the
|
||||
# buttons won't touch the end of the screen.
|
||||
|
||||
#### #### #### #### #### #### #### #### #### #### #### #
|
||||
|
||||
# Card Config
|
||||
# Do NOT change this unless you know what you are doing!
|
||||
type: custom:button-card
|
||||
color_type: blank-card
|
||||
aspect_ratio: 1/1
|
||||
14
home-assistant/lovelace/templates/gap-height.yaml
Executable file
14
home-assistant/lovelace/templates/gap-height.yaml
Executable file
@@ -0,0 +1,14 @@
|
||||
# This is used as a spacer between the screen
|
||||
# edge (of a mobile device) and the card/button.
|
||||
# Use this to create a small gap so that the
|
||||
# buttons won't touch the end of the screen.
|
||||
|
||||
#### #### #### #### #### #### #### #### #### #### #### #
|
||||
|
||||
# Card Config
|
||||
# Do NOT change this unless you know what you are doing!
|
||||
type: 'custom:button-card'
|
||||
color_type: blank-card
|
||||
styles:
|
||||
card:
|
||||
- height: 10px
|
||||
14
home-assistant/lovelace/templates/gap.yaml
Executable file
14
home-assistant/lovelace/templates/gap.yaml
Executable file
@@ -0,0 +1,14 @@
|
||||
# This is used as a spacer between the screen
|
||||
# edge (of a mobile device) and the card/button.
|
||||
# Use this to create a small gap so that the
|
||||
# buttons won't touch the end of the screen.
|
||||
|
||||
#### #### #### #### #### #### #### #### #### #### #### #
|
||||
|
||||
# Card Config
|
||||
# Do NOT change this unless you know what you are doing!
|
||||
type: 'custom:button-card'
|
||||
color_type: blank-card
|
||||
styles:
|
||||
card:
|
||||
- width: 0px
|
||||
@@ -815,10 +815,8 @@ automation:
|
||||
- sensor.update_grafana
|
||||
- sensor.update_portainer
|
||||
- sensor.update_unifi_poller
|
||||
- binary_sensor.nas_update_available
|
||||
to: "Update available"
|
||||
- platform: state
|
||||
entity_id: sensor.firmware_upgrade_nas
|
||||
to: "Upgrade available"
|
||||
- platform: numeric_state
|
||||
entity_id:
|
||||
- sensor.updates_pi_bathroomsmall
|
||||
@@ -832,7 +830,6 @@ automation:
|
||||
- platform: template
|
||||
value_template: >
|
||||
{{ states('sensor.latest_version_deconz') > states('sensor.current_version_deconz') or
|
||||
states('sensor.latest_firmware_conbee').lstrip('0x') > states('sensor.current_firmware_conbee').lstrip('0x') or
|
||||
states('sensor.latest_version_homeassistant') > states('sensor.current_version_homeassistant') or
|
||||
states('sensor.latest_version_pihole_core') > states('sensor.current_version_pihole_core') or
|
||||
states('sensor.latest_version_pihole_ftl') > states('sensor.current_version_pihole_ftl') or
|
||||
|
||||
Reference in New Issue
Block a user