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

support_brightness does'nt work

Open jlfrucot opened this issue 3 years ago • 7 comments

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+

jlfrucot avatar Nov 06 '22 17:11 jlfrucot

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

Tony763 avatar Nov 18 '22 22:11 Tony763

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 ?). 

jlfrucot avatar Nov 19 '22 10:11 jlfrucot

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.

Tony763 avatar Nov 19 '22 11:11 Tony763

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.

twrecked avatar Nov 19 '22 23:11 twrecked

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.

vahaldor avatar Nov 28 '22 17:11 vahaldor

It should be in the latest release.

Sorry, I forgot to do this last weekend.

twrecked avatar Nov 28 '22 17:11 twrecked