summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2025-09-08 19:19:14 +0400
committerSuren A. Chilingaryan <csa@suren.me>2025-09-08 19:19:14 +0400
commit0494cf139a6a3324e10e2cfa3479d9b0b3ddd779 (patch)
treef4a642bda41f5308c22fc10c561542edcb602dd4
parent346c5ea64f9c9d19dde63c8e85b1477440f2778f (diff)
downloadhass-0494cf139a6a3324e10e2cfa3479d9b0b3ddd779.tar.gz
hass-0494cf139a6a3324e10e2cfa3479d9b0b3ddd779.tar.bz2
hass-0494cf139a6a3324e10e2cfa3479d9b0b3ddd779.tar.xz
hass-0494cf139a6a3324e10e2cfa3479d9b0b3ddd779.zip
System changes
-rw-r--r--.gitignore8
-rw-r--r--.storage/homeassistant.exposed_entities49
-rw-r--r--.storage/lovelace.lovelace_research485
-rw-r--r--hacs-install.sh126
4 files changed, 439 insertions, 229 deletions
diff --git a/.gitignore b/.gitignore
index 770aaee..8de1d25 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,7 +2,6 @@
secrets.yaml
keys
backups
-custom_components
*\.log
*\.log\.*
*\.db
@@ -10,6 +9,7 @@ custom_components
themes
tts
www
+ha_token
.cloud/
.storage/auth
@@ -37,3 +37,9 @@ www
.storage/core.config_entries
.storage/core.device_registry
.storage/sonoff/
+
+# Standard custom components (unpatched)
+custom_components/ble_monitor
+custom_components/hacs
+custom_components/remote_homeassistant
+custom_components/sonoff
diff --git a/.storage/homeassistant.exposed_entities b/.storage/homeassistant.exposed_entities
index 521fdf3..624db19 100644
--- a/.storage/homeassistant.exposed_entities
+++ b/.storage/homeassistant.exposed_entities
@@ -626,6 +626,55 @@
"should_expose": false
}
}
+ },
+ "switch.0xa4c13895a5fc1187": {
+ "assistants": {
+ "conversation": {
+ "should_expose": true
+ }
+ }
+ },
+ "select.0xa4c13895a5fc1187_power_outage_memory": {
+ "assistants": {
+ "conversation": {
+ "should_expose": false
+ }
+ }
+ },
+ "select.0xa4c13895a5fc1187_indicator_mode": {
+ "assistants": {
+ "conversation": {
+ "should_expose": false
+ }
+ }
+ },
+ "sensor.0xa4c13895a5fc1187_power": {
+ "assistants": {
+ "conversation": {
+ "should_expose": false
+ }
+ }
+ },
+ "sensor.0xa4c13895a5fc1187_energy": {
+ "assistants": {
+ "conversation": {
+ "should_expose": false
+ }
+ }
+ },
+ "lock.0xa4c13895a5fc1187_child_lock": {
+ "assistants": {
+ "conversation": {
+ "should_expose": true
+ }
+ }
+ },
+ "update.0xa4c13895a5fc1187": {
+ "assistants": {
+ "conversation": {
+ "should_expose": false
+ }
+ }
}
}
}
diff --git a/.storage/lovelace.lovelace_research b/.storage/lovelace.lovelace_research
index c3178a7..40b4df3 100644
--- a/.storage/lovelace.lovelace_research
+++ b/.storage/lovelace.lovelace_research
@@ -1,234 +1,263 @@
{
- "version": 1,
- "minor_version": 1,
- "key": "lovelace.lovelace_research",
- "data": {
- "config": {
- "views": [
+ "version": 1,
+ "minor_version": 1,
+ "key": "lovelace.lovelace_research",
+ "data": {
+ "config": {
+ "views": [
+ {
+ "title": "Home",
+ "cards": [
+ {
+ "type": "vertical-stack",
+ "cards": [
{
- "title": "Home",
- "cards": [
- {
- "type": "vertical-stack",
- "cards": [
- {
- "type": "custom:restriction-card",
- "restrictions": {
- "confirm": {
- "exemptions": null
- }
- },
- "card": {
- "type": "entities",
- "entities": [
- {
- "entity": "input_boolean.mode_away"
- },
- {
- "entity": "input_boolean.mode_production"
- },
- {
- "entity": "select.entrance_vibrations_sensitivity"
- }
- ],
- "title": "Mode"
- }
- },
- {
- "type": "entities",
- "entities": [
- {
- "entity": "binary_sensor.entrance_door_contact"
- },
- {
- "entity": "sensor.entrance_vibrations_action"
- },
- {
- "entity": "binary_sensor.balcony_doors"
- },
- {
- "entity": "binary_sensor.motions_all"
- },
- {
- "entity": "switch.lights_all"
- }
- ],
- "title": "Intrusion"
- },
- {
- "type": "entities",
- "entities": [
- {
- "entity": "binary_sensor.hall_smoke_smoke"
- },
- {
- "entity": "sensor.kitchen_gas_carbon_monoxide"
- },
- {
- "entity": "binary_sensor.bathroom_leak_water_leak"
- }
- ],
- "title": "Safety"
- },
- {
- "type": "entities",
- "entities": [
- {
- "entity": "binary_sensor.living_balcony_contact",
- "name": "Living"
- },
- {
- "entity": "binary_sensor.kitchen_balcony_contact",
- "name": "Kitchen"
- },
- {
- "entity": "binary_sensor.bedroom_balcony_contact",
- "name": "Bedroom"
- },
- {
- "entity": "binary_sensor.guestroom_balcony_contact",
- "name": "Guestroom"
- }
- ],
- "title": "Balcony"
- }
- ]
- },
- {
- "type": "vertical-stack",
- "cards": [
- {
- "type": "history-graph",
- "entities": [
- {
- "entity": "binary_sensor.hall_smoke_smoke",
- "name": "Smoke"
- },
- {
- "entity": "binary_sensor.kitchen_gas",
- "name": "Gas (CO)"
- },
- {
- "entity": "binary_sensor.bathroom_leak_water_leak",
- "name": "Water Leak"
- }
- ],
- "hours_to_show": 48,
- "title": "Safety (Last 48 hours)"
- },
- {
- "type": "history-graph",
- "entities": [
- {
- "entity": "binary_sensor.entrance_door_contact",
- "name": "Entrance Door"
- },
- {
- "entity": "binary_sensor.balcony_doors"
- },
- {
- "entity": "binary_sensor.entrance_vibrations_vibration",
- "name": "Vibrations"
- },
- {
- "entity": "sensor.entrance_vibrations_strength",
- "name": "Strength"
- },
- {
- "entity": "sensor.hall_motions_illuminance_lux",
- "name": "Illumination Hall"
- },
- {
- "entity": "switch.lights_all",
- "name": "All Lights"
- }
- ],
- "hours_to_show": 48,
- "title": "Intrusion (Last 48 hours)"
- },
- {
- "type": "history-graph",
- "entities": [
- {
- "entity": "binary_sensor.hall_motions_occupancy",
- "name": "Hall"
- },
- {
- "entity": "binary_sensor.office_motions_occupancy",
- "name": "Office"
- },
- {
- "entity": "binary_sensor.presence_presence",
- "name": "Living"
- },
- {
- "entity": "binary_sensor.bedroom_motions_occupancy",
- "name": "Bedroom"
- },
- {
- "entity": "binary_sensor.guestroom_motions_occupancy",
- "name": "Guestroom"
- },
- {
- "entity": "binary_sensor.kitchen_motions_occupancy",
- "name": "Kitchen"
- }
- ],
- "hours_to_show": 48,
- "title": "Motions (Last 48 hours)"
- }
- ]
- },
- {
- "type": "vertical-stack",
- "cards": [
- {
- "type": "entities",
- "title": "Doors",
- "entities": [
- {
- "entity": "switch.hall_speakerphone",
- "name": "Building Door"
- }
- ]
- },
- {
- "show_state": true,
- "show_name": true,
- "camera_view": "auto",
- "type": "picture-entity",
- "entity": "camera.192_168_50_132"
- },
- {
- "show_state": true,
- "show_name": true,
- "camera_view": "auto",
- "type": "picture-entity",
- "entity": "camera.192_168_50_51"
- },
- {
- "show_state": true,
- "show_name": true,
- "camera_view": "auto",
- "type": "picture-entity",
- "entity": "camera.ovenview"
- },
- {
- "type": "logbook",
- "entities": [
- "binary_sensor.entrance_door_contact",
- "sensor.entrance_vibrations_strength",
- "binary_sensor.hall_motions_occupancy",
- "sensor.entrance_vibrations_action"
- ],
- "hours_to_show": 24,
- "title": "Logs"
- }
- ]
- }
- ]
+ "type": "custom:restriction-card",
+ "restrictions": {
+ "confirm": {
+ "exemptions": null
+ }
+ },
+ "card": {
+ "type": "entities",
+ "entities": [
+ {
+ "entity": "input_boolean.mode_away"
+ },
+ {
+ "entity": "input_boolean.mode_production"
+ },
+ {
+ "entity": "select.entrance_vibrations_sensitivity"
+ }
+ ],
+ "title": "Mode"
+ }
+ },
+ {
+ "type": "custom:restriction-card",
+ "restrictions": {
+ "confirm": {
+ "exemptions": null
+ }
+ },
+ "card": {
+ "type": "entities",
+ "entities": [
+ {
+ "entity": "switch.hall_camera",
+ "name": "Hall"
+ },
+ {
+ "entity": "switch.living_livingviewswitch_living_livingviewswitch",
+ "name": "Living"
+ }
+ ],
+ "title": "Security Cameras"
+ }
+ },
+ {
+ "type": "entities",
+ "entities": [
+ {
+ "entity": "binary_sensor.entrance_door_contact"
+ },
+ {
+ "entity": "sensor.entrance_vibrations_action"
+ },
+ {
+ "entity": "binary_sensor.balcony_doors"
+ },
+ {
+ "entity": "binary_sensor.motions_all"
+ },
+ {
+ "entity": "switch.lights_all"
+ }
+ ],
+ "title": "Intrusion"
+ },
+ {
+ "type": "entities",
+ "entities": [
+ {
+ "entity": "binary_sensor.hall_smoke_smoke",
+ "name": "Hall/Smoke"
+ },
+ {
+ "entity": "binary_sensor.kitchen_gas_kitchen_gas_gas",
+ "name": "Kitchen/Gas"
+ },
+ {
+ "entity": "sensor.kitchen_gas_carbon_monoxide",
+ "name": "Kitchen/Gas WiFi"
+ },
+ {
+ "entity": "binary_sensor.bathroom_leak_water_leak",
+ "name": "Bathroom Leak"
+ }
+ ],
+ "title": "Safety"
+ },
+ {
+ "type": "entities",
+ "entities": [
+ {
+ "entity": "binary_sensor.living_balcony_contact",
+ "name": "Living"
+ },
+ {
+ "entity": "binary_sensor.kitchen_balcony_contact",
+ "name": "Kitchen"
+ },
+ {
+ "entity": "binary_sensor.bedroom_balcony_contact",
+ "name": "Bedroom"
+ },
+ {
+ "entity": "binary_sensor.guestroom_balcony_contact",
+ "name": "Guestroom"
+ }
+ ],
+ "title": "Balcony"
+ }
+ ]
+ },
+ {
+ "type": "vertical-stack",
+ "cards": [
+ {
+ "type": "history-graph",
+ "entities": [
+ {
+ "entity": "binary_sensor.hall_smoke_smoke",
+ "name": "Smoke"
+ },
+ {
+ "entity": "binary_sensor.kitchen_gas",
+ "name": "Gas (CO)"
+ },
+ {
+ "entity": "binary_sensor.bathroom_leak_water_leak",
+ "name": "Water Leak"
+ }
+ ],
+ "hours_to_show": 48,
+ "title": "Safety (Last 48 hours)"
+ },
+ {
+ "type": "history-graph",
+ "entities": [
+ {
+ "entity": "binary_sensor.entrance_door_contact",
+ "name": "Entrance Door"
+ },
+ {
+ "entity": "binary_sensor.balcony_doors"
+ },
+ {
+ "entity": "binary_sensor.entrance_vibrations_vibration",
+ "name": "Vibrations"
+ },
+ {
+ "entity": "sensor.entrance_vibrations_strength",
+ "name": "Strength"
+ },
+ {
+ "entity": "sensor.hall_motions_illuminance_lux",
+ "name": "Illumination Hall"
+ },
+ {
+ "entity": "switch.lights_all",
+ "name": "All Lights"
+ }
+ ],
+ "hours_to_show": 48,
+ "title": "Intrusion (Last 48 hours)"
+ },
+ {
+ "type": "history-graph",
+ "entities": [
+ {
+ "entity": "binary_sensor.hall_motions_occupancy",
+ "name": "Hall"
+ },
+ {
+ "entity": "binary_sensor.office_motions_occupancy",
+ "name": "Office"
+ },
+ {
+ "entity": "binary_sensor.presence_presence",
+ "name": "Living"
+ },
+ {
+ "entity": "binary_sensor.bedroom_motions_occupancy",
+ "name": "Bedroom"
+ },
+ {
+ "entity": "binary_sensor.guestroom_motions_occupancy",
+ "name": "Guestroom"
+ },
+ {
+ "entity": "binary_sensor.kitchen_motions_occupancy",
+ "name": "Kitchen"
+ }
+ ],
+ "hours_to_show": 48,
+ "title": "Motions (Last 48 hours)"
+ }
+ ]
+ },
+ {
+ "type": "vertical-stack",
+ "cards": [
+ {
+ "type": "entities",
+ "title": "Doors",
+ "entities": [
+ {
+ "entity": "switch.hall_speakerphone",
+ "name": "Building Door"
+ }
+ ]
+ },
+ {
+ "show_state": true,
+ "show_name": true,
+ "camera_view": "auto",
+ "type": "picture-entity",
+ "entity": "camera.192_168_50_132"
+ },
+ {
+ "show_state": true,
+ "show_name": true,
+ "camera_view": "auto",
+ "type": "picture-entity",
+ "entity": "camera.192_168_50_51"
+ },
+ {
+ "show_state": true,
+ "show_name": true,
+ "camera_view": "auto",
+ "type": "picture-entity",
+ "entity": "camera.ovenview"
+ },
+ {
+ "type": "logbook",
+ "entities": [
+ "binary_sensor.entrance_door_contact",
+ "sensor.entrance_vibrations_strength",
+ "binary_sensor.hall_motions_occupancy",
+ "sensor.entrance_vibrations_action"
+ ],
+ "hours_to_show": 24,
+ "title": "Logs"
}
- ]
+ ]
+ }
+ ]
}
+ ]
}
+ }
} \ No newline at end of file
diff --git a/hacs-install.sh b/hacs-install.sh
new file mode 100644
index 0000000..baf94d0
--- /dev/null
+++ b/hacs-install.sh
@@ -0,0 +1,126 @@
+#!/bin/bash
+# wget -O - https://get.hacs.xyz | bash -
+set -e
+
+RED_COLOR='\033[0;31m'
+GREEN_COLOR='\033[0;32m'
+GREEN_YELLOW='\033[1;33m'
+NO_COLOR='\033[0m'
+
+declare haPath
+declare -a paths=(
+ "$PWD"
+ "$PWD/config"
+ "/config"
+ "$HOME/.homeassistant"
+ "/usr/share/hassio/homeassistant"
+)
+declare currentVersion
+declare currentYear
+declare currentMonth
+declare currentPatch
+declare targetVersion
+declare targetYear
+declare targetMonth
+declare targetPatch
+
+function info () { echo -e "${GREEN_COLOR}INFO: $1${NO_COLOR}";}
+function warn () { echo -e "${GREEN_YELLOW}WARN: $1${NO_COLOR}";}
+function error () { echo -e "${RED_COLOR}ERROR: $1${NO_COLOR}"; if [ "$2" != "false" ]; then exit 1;fi; }
+
+function checkRequirement () {
+ if [ -z "$(command -v "$1")" ]; then
+ error "'$1' is not installed"
+ fi
+}
+
+checkRequirement "wget"
+checkRequirement "unzip"
+
+info "Trying to find the correct directory..."
+for path in "${paths[@]}"; do
+ if [ -n "$haPath" ]; then
+ break
+ fi
+
+ if [ -f "$path/.HA_VERSION" ]; then
+ haPath="$path"
+ fi
+done
+
+if [ -n "$haPath" ]; then
+ info "Found Home Assistant configuration directory at '$haPath'"
+ cd "$haPath" || error "Could not change path to $haPath"
+ if [ ! -d "$haPath/custom_components" ]; then
+ info "Creating custom_components directory..."
+ mkdir "$haPath/custom_components"
+ fi
+
+ info "Changing to the custom_components directory..."
+ cd "$haPath/custom_components" || error "Could not change path to $haPath/custom_components"
+
+ info "Downloading HACS"
+ wget "https://github.com/hacs/integration/releases/latest/download/hacs.zip"
+
+ if [ -d "$haPath/custom_components/hacs" ]; then
+ warn "HACS directory already exist, cleaning up..."
+ rm -R "$haPath/custom_components/hacs"
+ fi
+
+ info "Creating HACS directory..."
+ mkdir "$haPath/custom_components/hacs"
+
+ info "Unpacking HACS..."
+ unzip "$haPath/custom_components/hacs.zip" -d "$haPath/custom_components/hacs" >/dev/null 2>&1
+
+
+ echo
+ info "Verifying versions"
+ targetVersion=$(sed -n -e '/^MINIMUM_HA_VERSION/p' "$haPath/custom_components/hacs/const.py" | cut -d '"' -f 2)
+ currentVersion=$(cat "$haPath/.HA_VERSION")
+
+ info "Current version is ${currentVersion}, minimum version is ${targetVersion}"
+
+ targetYear=$(echo "${targetVersion}" | cut -d "." -f 1)
+ currentYear=$(echo "${currentVersion}" | cut -d "." -f 1)
+
+ if [ "${currentYear}" -lt "${targetYear}" ]; then
+ rm -R "$haPath/custom_components/hacs"
+ error "Version ${currentVersion} is not new enough, needs at least ${targetVersion}"
+ fi
+
+ if [ "${currentYear}" == "${targetYear}" ]; then
+ targetMonth=$(echo "${targetVersion}" | cut -d "." -f 2)
+ currentMonth=$(echo "${currentVersion}" | cut -d "." -f 2)
+
+ if [ "${currentMonth}" -lt "${targetMonth}" ]; then
+ rm -R "$haPath/custom_components/hacs"
+ error "Version ${currentVersion} is not new enough, needs at least ${targetVersion}"
+ fi
+
+ if [ "${currentMonth}" == "${targetMonth}" ]; then
+ targetPatch=$(echo "${targetVersion}" | cut -d "." -f 3)
+ currentPatch=$(echo "${currentVersion}" | cut -d "." -f 3)
+
+ if [ "${currentPatch}" -lt "${targetPatch}" ]; then
+ rm -R "$haPath/custom_components/hacs"
+ error "Version ${currentVersion} is not new enough, needs at least ${targetVersion}"
+ fi
+ fi
+ fi
+
+ echo
+ info "Removing HACS zip file..."
+ rm "$haPath/custom_components/hacs.zip"
+ info "Installation complete."
+ echo
+ info "Remember to restart Home Assistant before you configure it"
+
+else
+ echo
+ error "Could not find the directory for Home Assistant" false
+ echo "Manually change the directory to the root of your Home Assistant configuration"
+ echo "With the user that is running Home Assistant"
+ echo "and run the script again"
+ exit 1
+fi