twrecked / hass-virtual

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

support_brightness does'nt work #41

Open jlfrucot opened 1 year ago

jlfrucot commented 1 year ago

trying to use virtual light, i experiment that issue : [support_brightness] is an invalid option for [light.virtual]

Home Assistant 2022.11.1 Supervisor 2022.10.2 Operating System 9.3 Interface utilisateur : 20221102.1 - latest

RPI 3+

Tony763 commented 1 year ago

Hello @jlfrucot could You check which version of hass-virtual You use and provide steps to reproduce the above error?

I just upgraded HA to 2022.11.3 and with version 7.7, everything works as expected.

EDIT: Sry, apparently using Master branch

My sample config:

 # ESP32_Aquarium
  - platform: virtual
    name: '!aqua UV'
    initial_value: 'off'
    initial_brightness: 0
    support_brightness: true
    support_color: false
    initial_color: [0,255]
    support_color_temp: false
    initial_color_temp: 0
    support_white_value: false
    initial_white_value: 0
    initial_availability: false
jlfrucot commented 1 year ago

Hello, Thanks for reply version 0.7.7 My config is :

virtual:
light:
  - platform: virtual
    name: 'Light 1'
    initial_value: 'off'
    initial_availability: true
    initial_brightness: 0
    support_brightness: true
    support_color: true
    initial_color: [0,255]
    support_color_temp: true
    initial_color_temp: 255

After upgraded HA to 2022.11.3 no change :

Invalid config for [light.virtual]: [support_brightness] is an invalid option for [light.virtual]. Check: light.virtual->support_brightness. (See ?, line ?). 
Tony763 commented 1 year ago

I think I maybe found it. I assume You use released version (0.7.7) and not master branch (As I do, sry for misinformation). 0.7.7 went out on 22., but support for setting brightness was added a 3 days later.

If I see correctly, in the released version, brightness was set as supported, by setting an initial brightness.

I would recommend You pull a master branch until a new release is made.

twrecked commented 1 year ago

Sorry for missing that - my real job got a bit hectic for a while.

I'll look to create a new release later this weekend.

vahaldor commented 1 year ago

Hi, same here. What does it mean to pull a master branch? Allowing beta releases in HACS? I installed it with HACS to Home Assistant. Thanks.

twrecked commented 1 year ago

It should be in the latest release.

Sorry, I forgot to do this last weekend.

github-actions[bot] commented 2 weeks ago

This issue is stale because it has been open for 365 days with no activity. This issue will be automatically closed within 28 days if there is no further activity.