Skip to content
Snippets Groups Projects
Commit 4391dafc authored by Andrei Gherzan's avatar Andrei Gherzan :penguin: Committed by Bernhard Rosenkränzer
Browse files

homeassistant-config-blueprint-dashboard: Introduce recipe


Add recipe for creating HomeAssistant's configuration
for dashboard blueprint.
- Install default configuration files. Currently
  it's only configuration.yaml
- Apply changes in run-time based on build variables

Signed-off-by: default avatarZbigniew Bodek <zbigniew.bodek@huawei.com>
Signed-off-by: Andrei Gherzan's avatarAndrei Gherzan <andrei.gherzan@huawei.com>
parent a0553134
No related branches found
No related tags found
No related merge requests found
# SPDX-FileCopyrightText: Huawei Inc.
#
# SPDX-License-Identifier: Apache-2.0
SUMMARY = "Home Assistant configuration for All Scenarios OS Smart Panel \
blueprint"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${OHOS_COREBASE}/LICENSES/Apache-2.0.txt;md5=ef3dabb8f39493f4ea410bebc1d01755"
INHIBIT_DEFAULT_DEPS = "1"
inherit allarch
do_fetch[noexec] = "1"
do_unpack[noexec] = "1"
do_patch[noexec] = "1"
do_configure[noexec] = "1"
do_compile[noexec] = "1"
require recipes-homeassistant/homeassistant/homeassistant-config.inc
require recipes-homeassistant/homeassistant/homeassistant-useradd.inc
do_install() {
install -d "${D}${HOMEASSISTANT_CONFIG_DIR}"
# MAC addresses can be adjusted in your local.conf.
cat >> "${D}${HOMEASSISTANT_CONFIG_DIR}/configuration.yaml" << EOF
default_config:
sensor:
- platform: allscenarios_sensors
mac: "${SMART_HOME_SENSORS_MAC}"
switch:
- platform: allscenarios_switch
mac: "${SMART_HOME_SWITCH_MAC}"
EOF
chown -R "${HOMEASSISTANT_USER}":homeassistant "${D}${HOMEASSISTANT_CONFIG_DIR}"
}
RDEPENDS_${PN} = "smart-home-homeassistant-plugin"
FILES_${PN} += "${HOMEASSISTANT_CONFIG_DIR}/configuration.yaml"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment