Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Virtual light devices and not just entities #53

Open
etokheim opened this issue Feb 4, 2023 · 4 comments
Open

Virtual light devices and not just entities #53

etokheim opened this issue Feb 4, 2023 · 4 comments

Comments

@etokheim
Copy link

etokheim commented Feb 4, 2023

Hi! I might have overlooked something, but I can't seem to figure out how to add a light as a device. Is that possible with the hass-virtual component?

I want to make a scene with the virtual lights, but scenes only support devices...

@twrecked
Copy link
Owner

twrecked commented Feb 4, 2023

This doesn't work? They appear as entities although I've never tried one in a scene. I don't have my test system running at the moment but I'll check later.

light:
  - platform: virtual
    name: 'Light 1'

@etokheim
Copy link
Author

etokheim commented Feb 5, 2023

Thanks!

My understanding is that a device is kind of a group of entities and that the scene creation tool only takes in devices.

I found that I could reference entities when manually editing the scenes.yaml file. Applying the scene changed the lights, but it's very tiresome editing scenes in yaml, compared to the UI.

I used the light from the readme (worked fine, and without any errors):

light:
  - platform: virtual
    name: 'Light 1'
    initial_value: 'on'
    support_brightness: true
    initial_brightness: 100
    support_color: true
    initial_color: [0,255]
    support_color_temp: true
    initial_color_temp: 255
    support_white_value: true
    initial_white_value: 240
    initial_availability: true

When adding a light through ie. the Hue integration, it creates a device with one or more entities attached to it. Ie. each light is one device, with one entity. The motion sensors, on the other hand, creates four entities for each device. One for motion, temperature, light level and battery.

I therefor expected the same behavior when adding virtual lights.

I ended up just adding my Hue hub to the test environment as a quick workaround.

@twrecked
Copy link
Owner

twrecked commented Feb 5, 2023

At the moment we don't create a device. I'll look at how to do it.

If you turn on 'advanced mode' in your user profile you can add entities to the scene from the UI. Could that be a workaround for now?

@etokheim
Copy link
Author

etokheim commented Feb 6, 2023

Ah, thanks! That's a perfectly good workaround! 😃

And by the way, thank you very much for creating and maintaining this awesome component - it's really useful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants