twrecked / hass-virtual

Virtual Components for Home Assistant
GNU General Public License v3.0
167 stars 28 forks source link

Can't find entity #12

Closed camels84 closed 3 years ago

camels84 commented 3 years ago

Hi, i install this integration directly from hacs, and i can't see the virtual entity... Can you provide a better install guide? I already had the virtual device in configuration.yaml Hass-Virtual version: v0.7.1 core: core-2021.4.3 supervisor: supervisor-2021.03.9

I really apreciate helping to solve this.

twrecked commented 3 years ago

Can you paste your configuration in here? Also, as an example, the following:

- platform: virtual
  name: "TV Outlet"
  initial_value: 'on'

will create a component called switch.virtual_tv_outlet. The virtual is added by Home Assistant.

camels84 commented 3 years ago

I already do it,

`

virtual: switch:

  • platform: virtual entity: virtual name: 'Switch_1'
  • platform: virtual name: 'Switch_2'

`

But i can't find the component. Convfiguration doesn't give any error, so it recognizes the "virtual", but i can't find in home assistant anything with the name virtual.

camels84 commented 3 years ago

Already found it, i don't know why, but i think your instruction wasn't too clear, imagem

i put like this:

switch:

  • platform: virtual name: "TV Outlet 2" initial_value: 'on'
    virtual:
    • platform: virtual name: "TV Outlet" initial_value: 'on' switch:
      • platform: virtual entity: virtual name: 'Switch_1' initial_value: 'on'
      • platform: virtual name: 'Switch_2' initial_value: 'on'

and the only that worked was "TV Outlet 2", that is defined outside the "Virtual:"

twrecked commented 3 years ago

Sorry, my instructions assume you are familiar with Home Assistant config. Try this in configuration.yaml:

virtual:

switch:
  platform: virtual
    name: "TV Outlet 2"
    initial_value: 'on'
  platform: virtual
    name: "TV Outlet"
    initial_value: 'on'
  platform: virtual
    name: 'Switch_1'
    initial_value: 'on'
  platform: virtual
    name: 'Switch_2'
    initial_value: 'on'

virtual: and switch: sections should only appear once in your entire configuration.

camels84 commented 3 years ago

That's a newbie mistake... =) I thought that the devices needed to be there, like an definition.. =)

Tanks for helping

twrecked commented 3 years ago

Glad to hear you got it working.