@@ -8,8 +8,8 @@ _Virtual_ is a component that provides virtual entities for _Home Assistant_.
8
8
# !!!BREAKING CHANGES!!!
9
9
10
10
Version 0.9 supports adding virtual devices using _ config flow_ . By default it
11
- will move your existing devices into a single file ` virtual.yaml ` . If you
12
- ** DO NOT** want this behaviour add this to your ` virtual ` configuration.
11
+ will move your existing devices into a single file ` virtual.yaml ` . If you ** DO
12
+ NOT** want this behaviour add this to your current ` virtual ` configuration.
13
13
14
14
``` yaml
15
15
virtual :
@@ -19,39 +19,46 @@ virtual:
19
19
20
20
# Table Of Contents
21
21
22
- <!-- TOC -->
23
- * [**Virtual devices for Home Assistant**](#virtual-devices-for-home-assistant)
24
- * [!!!BREAKING CHANGES!!!](#breaking-changes)
25
- * [Table Of Contents](#table-of-contents)
26
- * [Introduction](#introduction)
27
- * [Notes](#notes)
28
- * [Version 0.8 Documentation](#version-08-documentation)
29
- * [New Features in 0.9.0](#new-features-in-090)
30
- * [Config Flow](#config-flow)
31
- * [What pieces are done](#what-pieces-are-done)
32
- * [What you need to be wary of](#what-you-need-to-be-wary-of)
33
- * [What pieces need doing](#what-pieces-need-doing)
34
- * [What if it goes wrong?](#what-if-it-goes-wrong)
35
- * [Thanks](#thanks)
36
- * [Installation](#installation)
37
- * [HACS](#hacs)
38
- * [Component Configuration](#component-configuration)
39
- * [Entity Configuration](#entity-configuration)
40
- * [Common Attributes](#common-attributes)
41
- * [Availability](#availability)
42
- * [Persistence](#persistence)
43
- * [Switches](#switches)
44
- * [Binary Sensors](#binary-sensors)
45
- * [Sensors](#sensors)
46
- * [Lights](#lights)
47
- * [Locks](#locks)
48
- * [Fans](#fans)
49
- * [Covers](#covers)
50
- * [Valves](#valves)
51
- * [Device Tracking](#device-tracking)
52
- * [Old Style Entity Configuration](#old-style-entity-configuration)
53
- * [Services](#services)
54
- <!-- TOC -->
22
+
23
+ <!--toc:start-->
24
+ - [**Virtual devices for Home Assistant**](#virtual-devices-for-home-assistant)
25
+ - [!!!BREAKING CHANGES!!!](#breaking-changes)
26
+ - [Table Of Contents](#table-of-contents)
27
+ - [Introduction](#introduction)
28
+ - [Notes](#notes)
29
+ - [Version 0.8 Documentation](#version-08-documentation)
30
+ - [New Features in 0.9.0](#new-features-in-090)
31
+ - [Config Flow](#config-flow)
32
+ - [What pieces are done](#what-pieces-are-done)
33
+ - [What you need to be wary of](#what-you-need-to-be-wary-of)
34
+ - [What if it goes wrong?](#what-if-it-goes-wrong)
35
+ - [Thanks](#thanks)
36
+ - [Installation](#installation)
37
+ - [Getting the Software](#getting-the-software)
38
+ - [HACS](#hacs)
39
+ - [Adding the Integration](#adding-the-integration)
40
+ - [After a Fresh Install](#after-a-fresh-install)
41
+ - [After an Upgrade](#after-an-upgrade)
42
+ - [I don't want the New Behaviour!!!](#i-dont-want-the-new-behaviour)
43
+ - [Adding More Entries](#adding-more-entries)
44
+ - [Component Configuration](#component-configuration)
45
+ - [Entity Configuration](#entity-configuration)
46
+ - [File Layout](#file-layout)
47
+ - [Common Attributes](#common-attributes)
48
+ - [Availability](#availability)
49
+ - [Persistence](#persistence)
50
+ - [Switches](#switches)
51
+ - [Binary Sensors](#binary-sensors)
52
+ - [Sensors](#sensors)
53
+ - [Lights](#lights)
54
+ - [Locks](#locks)
55
+ - [Fans](#fans)
56
+ - [Covers](#covers)
57
+ - [Valves](#valves)
58
+ - [Device Tracking](#device-tracking)
59
+ - [Old Style Entity Configuration](#old-style-entity-configuration)
60
+ - [Services](#services)
61
+ <!--toc:end-->
55
62
56
63
57
64
# Introduction
@@ -76,22 +83,15 @@ Finally. After sitting on it for far too long I decided to do the work I
76
83
needed to, this integration now acts much like every integration, splitting
77
84
down by entity, device and integration.
78
85
79
- This means a lot of this documentation is now out of date, I will upgrade it
80
- when all the changes have been finalized, for now I will just add a quick note
81
- inline.
82
-
83
86
# ### What pieces are done
84
87
85
88
- _upgrade_; the code will upgrade a _0.8_ build to the _config flow_ system.
86
89
Your current configuration will be moved into 1 file, `virtual.yaml`. This
87
90
file contains all your virtual devices. Edit this file to add any type of
88
91
device.
89
- - _configuration_; the settings are still available you only need to edit them
90
- in one place, `virtual.yaml`. The layout should be obvious after the
91
- upgrade.
92
- - _multiple integration instances_; you can group virtual devices, each group
93
- will use a different configuration file
94
92
- _services_; they follow the _Home Assistant_ standard
93
+ - _multiple integrations_; the integration can be added several times and you
94
+ can spread your devices across several files
95
95
- _device groupings_; for example, a motion detector can have a motion
96
96
detection entity and a battery entity, upgraded devices will have a one to
97
97
one relationship. For example, the following will create a motion device
@@ -121,12 +121,6 @@ inline.
121
121
4. delete the virtual integration
122
122
5. add back the virtual integration in accepting the defaults
123
123
124
- # ### What pieces need doing
125
-
126
- - _reload/reconfigure_; this somewhat works, but I need to deal with orphans
127
- when devices are turned off
128
- - _documentation_; the configuration is handled differently now
129
-
130
124
# ### What if it goes wrong?
131
125
132
126
For now I recommend leaving your old configuration in place so you can revert
@@ -149,19 +143,56 @@ Many thanks to:
149
143
150
144
# Installation
151
145
152
- # # HACS
146
+ # # Getting the Software
147
+
148
+ # ## HACS
153
149
[](https://github.com/hacs/integration)
154
150
155
151
Virtual is part of the default HACS store. If you're not interested in
156
152
development branches this is the easiest way to install.
157
153
154
+ # # Adding the Integration
155
+
156
+ # ## After a Fresh Install
157
+
158
+ When you have created your initial configuration file do the following :
159
+
160
+ - go to `Settings` -> `Devices and Integrations` -> `+ ADD INTEGRATION`
161
+ - search for _virtual_ and choose the integration
162
+ - give your configuration a name and point it at your newly created file
163
+
164
+ Then you click OK
165
+
166
+ # ## After an Upgrade
167
+
168
+ All your devices will be moved to a group called _import_ and put into
169
+ ` /config/virtual.yaml` . The system will create a single _virtual_ integration.
170
+
171
+ # # I don't want the New Behaviour!!!
172
+
173
+ If you want to keep your existing behaviour change your current `virtual`
174
+ entry in `configuration.yaml` to this :
175
+
176
+ ` ` ` yaml
177
+ virtual:
178
+ yaml_config: True
179
+ ` ` `
180
+
181
+ # # Adding More Entries
182
+
183
+ You can add more than one integration by selecting `Add Entry` on the
184
+ _virtual_ integration page. You will need to give this new entity group a name
185
+ and point it to the new file.
186
+
158
187
159
188
# Component Configuration
160
189
161
- - ` yaml_config` ; set to `True` to enable backwards compatability, set to `False`
190
+ You set this to enable backwards compatibility.
191
+
192
+ - ` yaml_config` ; set to `True` to enable backwards compatibility, set to `False`
162
193
to disable it. The default is `False`.
163
194
164
- For example, this enable backwards compatability .
195
+ For example, this enable backwards compatibility .
165
196
166
197
` ` ` yaml
167
198
virtual:
@@ -171,10 +202,18 @@ virtual:
171
202
172
203
# Entity Configuration
173
204
174
- All component configuration is done through a _yaml_ file. There is a single
175
- file per integration instance. The default file, created on upgrade, is
176
- `/config/virtual.yaml`. An empty file looks like this :
205
+ All component configuration is done through _yaml_ files. You can put all of
206
+ your virtual devices into a single _yaml_ file or you can group devices
207
+ together in multiple file.
208
+
209
+ If this is a fresh install you will need to install a _virtual_ integration
210
+ instance and tell it about your file. If you are upgrading from _0.8_ the system will
211
+ create a single instance and copy all your current devices into a
212
+ ` /config/virtual.yaml` .
213
+
214
+ # # File Layout
177
215
216
+ An empty file looks like this :
178
217
` ` ` yaml
179
218
version: 1
180
219
devices: {}
0 commit comments