mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-17 05:04:21 +01:00
Disable zwave-js soft-reset on vm (#2261)
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## 0.1.47
|
||||
|
||||
- Disable soft-reset if VM is detected
|
||||
|
||||
## 0.1.46
|
||||
|
||||
- Bump Z-Wave JS to 8.7.5
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Z-Wave JS",
|
||||
"version": "0.1.46",
|
||||
"version": "0.1.47",
|
||||
"slug": "zwave_js",
|
||||
"description": "Control a ZWave network with Home Assistant Z-Wave JS",
|
||||
"arch": ["amd64", "i386", "armhf", "armv7", "aarch64"],
|
||||
@@ -8,6 +8,7 @@
|
||||
"startup": "services",
|
||||
"init": false,
|
||||
"stage": "stable",
|
||||
"hassio_api": true,
|
||||
"homeassistant": "2021.2.0b0",
|
||||
"ports": {
|
||||
"3000/tcp": null
|
||||
|
||||
@@ -11,6 +11,8 @@ declare s2_authenticated
|
||||
declare s2_unauthenticated
|
||||
declare log_level
|
||||
declare flush_to_disk
|
||||
declare host_chassis
|
||||
declare soft_reset
|
||||
|
||||
readonly DOCS_EXAMPLE_KEY_1="2232666D100F795E5BB17F0A1BB7A146"
|
||||
readonly DOCS_EXAMPLE_KEY_2="A97D2A51A6D4022998BEFC7B5DAE8EA1"
|
||||
@@ -98,6 +100,16 @@ else
|
||||
log_level=$(bashio::config 'log_level')
|
||||
fi
|
||||
|
||||
host_chassis=$(bashio::host.chassis)
|
||||
|
||||
if [ "${host_chassis}" == "vm" ]; then
|
||||
soft_reset=false
|
||||
bashio::log.info "Virtual Machine detected, disabling soft-reset"
|
||||
else
|
||||
soft_reset=true
|
||||
bashio::log.info "Virtual Machine not detected, enabling soft-reset"
|
||||
fi
|
||||
|
||||
|
||||
# Generate config
|
||||
bashio::var.json \
|
||||
@@ -106,6 +118,7 @@ bashio::var.json \
|
||||
s2_authenticated "${s2_authenticated}" \
|
||||
s2_unauthenticated "${s2_unauthenticated}" \
|
||||
log_level "${log_level}" \
|
||||
soft_reset "^${soft_reset}" \
|
||||
| tempio \
|
||||
-template /usr/share/tempio/zwave_config.conf \
|
||||
-out /etc/zwave_config.json
|
||||
|
||||
@@ -13,5 +13,6 @@
|
||||
"S2_AccessControl": "{{ .s2_access_control }}",
|
||||
"S2_Authenticated": "{{ .s2_authenticated }}",
|
||||
"S2_Unauthenticated": "{{ .s2_unauthenticated }}"
|
||||
}
|
||||
},
|
||||
"enableSoftReset": {{ .soft_reset }}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user