twrecked / hass-virtual

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

nodeRed unable to pull brightness value #10

Open Markker98 opened 3 years ago

Markker98 commented 3 years ago

I am trying to get the brightness value from one of the virtual lamps i have created but it seems like that is not possible. i entered the entity ID to the "eventsState" and added "_brightness_pct" to it.

Is there another way to get the value? It is possible to set the value in node red in the "call service" node using:

{"entity_id":"light.virtual_light_1","brightness_pct":50}

twrecked commented 3 years ago

Sorry, I missed this one. Did you get it fixed? I don't use nodeRed but I think they should just act like lights.

jeroenvdd commented 2 years ago

Hi I have tested this and it does work, but the 'default' light created with virtual, does not use percentage data.new_state.attributes.brightness -> this message will always be 0.255

but to the developper: adding percentage would be greatly apreciated :D