hass-virtual
hass-virtual copied to clipboard
virtual.yaml will not be visible
I cannot find the virtual.yaml file.
You can create it and put your configuration in it.
I am running HAOS and created the virtual.yaml in the same folder as the default configuration.yaml is located - it does not get loaded though. Do I have to link it in configuration.yaml somewhere, like with other platforms?
You still need to add a virtual integration:
Settings --> Devices & Services --> Virtual Components
then choose the file you created.
Hi, I have the same issue. How do I get the integration working?
I tried the following:
- I downloaded Virtual Components via HACS
- Added
virtual:to my configuration.yaml - I created a virtual.yaml file in the same folder as configuration.yaml
- The integration is loaded (I see it at Settings --> Devices & Services --> Virtual Compontens . When I try to add a entry I get the following error:
This integration cannot be added from the UI You can add this integration by including it in your 'configuration.yaml'. See the documentation for more information.
I also tried to use virtual: !include virtual.yaml .
This is my virtual.yaml:
binary_sensor:
- platform: virtual name: "Binary Sensor 1" initial_value: "on" class: presence
I had the same issue with the latest 0.9.0b18
On a bare-metal installation, the virtual.yaml is not created automatically. Maybe due to folder permission problems. Could not find any hints in the debug log.
So I created the virtual.yaml file manually (in the same folder as the configuration.yaml) with one test light and no entry in the configuration.yaml.
version: 1
devices:
Test Light:
- platform: light
initial_value: "off"
Saved, and restarted, HA. Now I see my test light.
What's not working, if I created just an empty file, without the
version: 1
devices: {}
Then I got this
Now the Integration is working and showing my test device. What's not working, is to create new virtual devices through the UI. After clicking "add Entry" I get the message to create the config yaml. I think there is something wrong, how the integration is searching for the config file on baremetal/non docker installations.
There is no way to add devices directly from the UI. To add more virtual device you have 2 options:
- add more devices to your current virtual yaml file and select "reload"
- create a new file with the entries then choose "ADD ENTRY", choose a new group name new and point it at the new file
It's done like this because config flow doesn't have seem to be set up for this, you can't edit a list of items very easily. config flow normally lets you put enough information in to connect to a remote service that will provide the devices to HA. Here the remote service is your yaml file which you are free to edit and reload.
And I will improve the documentation about setting this up.
There is no way to add devices directly from the UI. To add more virtual device you have 2 options:
* add more devices to your current virtual yaml file and select "reload" * create a new file with the entries then choose "ADD ENTRY", choose a new group name new and point it at the new fileIt's done like this because config flow doesn't have seem to be set up for this, you can't edit a list of items very easily. config flow normally lets you put enough information in to connect to a remote service that will provide the devices to HA. Here the remote service is your yaml file which you are free to edit and reload.
And I will improve the documentation about setting this up.
ahhh, ok, this was misleading from the documentation, where you wrote, that the integration can be configured via config flow. But you meant the first installation and not the creation of the individual virtual devices. Ok, understood. So far everything is going great except for the initial hiccup. Thank you very much!