-
Notifications
You must be signed in to change notification settings - Fork 1
/
basic.codin
111 lines (99 loc) · 1.87 KB
/
basic.codin
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
Metadata
name: "BasicExample"
description: "An example of using the basic components in CodinTxt"
author: "klpanagi"
token: "1234" // The Codin API Token here!!
end
// Broker definitions section
Broker<MQTT> BrokerA
host: "localhost"
port: 1883 // Change this accordingly
webPath: "/mqtt"
webPort: 8883
auth:
username: "USERNAME"
password: "PASSWORD"
end
Broker<MQTT> BrokerB
host: "homeassistant.local"
port: 1883 // Change this accordingly
webPath: "/mqtt"
webPort: 8883
auth:
username: "USERNAME"
password: "PASSWORD"
end
// Entity definitions section
Entity Logs
type: sensor
topic: "goaldsl.logs"
broker: BrokerA
attributes:
- msg: dict
- level: str
end
Entity TempSensor1
type: sensor
topic: 'bedroom.sensor.temperature'
broker: BrokerA
attributes:
- temp: float
end
// Visual component definitions section
Gauge G1
label: "MyGauge"
entity: TempSensor1
attribute: temp
minValue: 0
maxValue: 1
leftColor: Red
rightColor: Blue
levels: 10
hideTxt: false
unit: "%"
position:
x: 0
y: 0
width: 10
height: 10
end
ValueDisplay VD1
label: "MyValueDisplay"
entity: TempSensor1
attribute: temp
unit: "%"
position:
x: 10
y: 10
width: 10
height: 10
end
JsonViewer JV1
label: "MyJsonViewer"
entity: TempSensor1
position:
x: 20
y: 20
width: 10
height: 10
end
AliveDisplay AV1
label: "MyAliveDisplay"
entity: TempSensor1
timeout: 60
position:
x: 30
y: 30
width: 10
height: 10
end
LogsDisplay LD1
label: "MyLogsDisplay"
entity: Logs
attribute: msg
position:
x: 40
y: 40
width: 10
height: 10
end