blob: 73a2a604b262020f3b42484ab1f56ed1c810b081 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit readme.gentoo-r1
DESCRIPTION="A different take on the thermostat card for Home Assistant Lovelace UI"
HOMEPAGE="https://github.com/nervetattoo/simple-thermostat"
SRC_URI="https://github.com/nervetattoo/simple-thermostat/releases/download/${PV}/${PN}.js -> ${P}.js"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
IUSE=""
RDEPEND="app-misc/homeassistant-bin"
DEPEND=""
BDEPEND=""
S="${WORKDIR}"
DISABLE_AUTOFORMATTING=1
FORCE_PRINT_ELOG=1
DOC_CONTENTS="
To configure Lovelace to load the simple-thermostat card, first read:
https://github.com/nervetattoo/simple-thermostat#installation-manual
Then, to add the resource item via the Lovelace UI:
(three dots - top RHS) -> 'Configure UI' (top RHS) -> (three dots - top RHS) -> 'Raw config editor'
(and add the three lines described in the simple-thermostat manual installation)
As an example, it may look like this (if there are no other custom cards configured):
title: Myplace
resources:
- url: /local/simple-thermostat.js?v=1
type: module
views:
- ...
Above from, and thanks to the contributors at:
https://www.reddit.com/r/homeassistant/comments/alcuv1/lovelace_custom_cards_without_uilovelaceyaml/
Add a simple-thermostat card:
1. (+ button - bottom RHS) - > 'Manual Card'
2. Add yaml configuration in the editor - for example:
name: myroom
type: 'custom:simple-thermostat'
entity: climate.my-entity_1
"
src_unpack() {
true
}
src_install() {
insinto /etc/homeassistant/www
newins "${DISTDIR}/${P}.js" "${PN}.js"
readme.gentoo_create_doc
default
}
pkg_postinst() {
readme.gentoo_print_elog
}
|