hass-virtual icon indicating copy to clipboard operation
hass-virtual copied to clipboard

README doesn't mention manually adding the Virtual Components integration

Open jack68k opened this issue 11 months ago • 3 comments

I'm new to installing custom components from HACS and I couldn't initially get Virtual Components version 0.9.0b18 to load at all. I eventually learned that the missing piece was putting the following in configuration.yaml

virtual:

The README is quite thorough overall, but describes adding the virtual: section of configuration.yaml in the context of enabling backward compatibility. Someone like me who does not need backward compatibility with old configuration may not realize that installing the custom component from HACS is not enough to enable the integration -- it won't be loaded at all without this section in configuration.yaml.

jack68k avatar Dec 16 '24 01:12 jack68k

It shouldn't be needed.

I'll try a fresh install here.

twrecked avatar Dec 16 '24 02:12 twrecked

Works on my quick test here:

I removed all reference to virtual from my config. I restarted. I installed virtual from HACS. I restarted. I went to Settings -> Devices and Services -> + ADD INTEGRATION I searched for Virtual and selected Virtual Components. I chose the name imported and pointed it at my file /config/virtual-original.yaml.

And the devices appeared.

Now if I want to add any more devices I can click ADD ENTRY.

If this doesn't work for you can you attach some debug. The virtual: entry in configuration.yaml should not be needed on new installs.

edit: If this works I'll add something to the docs.

twrecked avatar Dec 16 '24 02:12 twrecked

Ah! So the missing piece for me was that it is necessary to manually add the integration because installing the component from HACS doesn't do that. I didn't realize that because I didn't know what I should be expecting to see after restarting. The only thing I knew to look for were the devices and entities I had defined, and they weren't showing up. This led me down the path of editing configuration.yaml.

I removed the Virtual Devices component, removed virtual: from configuration.yaml and started from scratch. I did as you described above -- I added the integration through the UI -- and it prompted me to add virtual.yaml and my devices and entities showed up immediately. Excellent!

It might be helpful to others configuring this for the first time to get step-by-step instructions for this into the documentation when it's updated when 0.9 is out of beta.

Thanks for the prompt reply!

jack68k avatar Dec 16 '24 03:12 jack68k