adizanni / floor3d-card

Your Home Digital Twin: aka floor3d-card. Visualize Home Assistant state and perform actions using objects in a 3D home model based on Three.js.
https://github.com/adizanni/floor3d-card
MIT License
448 stars 65 forks source link

Dynamically set room parallelipiping on/off based on light status #140

Open justinhunt1223 opened 1 year ago

justinhunt1223 commented 1 year ago

Excellent work on this! I just found this a few days ago by accident after refusing to go the render route.

I have some rooms setup with to fill with yellow when the light is on because the dim percentage can be so low its hard to tell by the model if the light is even on. I have the color set to yellow and and its nice and visible. However, when the light is turned off, the color goes to white. Is there a way to dynamically set the transparency (such as turn it to 0 if the light is off) of a room? I'm looking to just turn on the room fill when the light is on, and turn it off when the light is off.

adizanni commented 1 year ago

Hello @justinhunt1223, have you tried to set the color for 'off' to transparent ? I think I have tried in the past and it was not working properly. If the behaviour is not correct I will try to fix

justinhunt1223 commented 1 year ago

I tried setting color to transparent, but it turns white instead.

colorcondition:
  - color: yellow
    state: "on"
  - color: transparent
    state: "off"
adizanni commented 10 months ago

With huge delay, I have to test it

FragMenthor commented 10 months ago

I think this pull request is about this: https://github.com/adizanni/floor3d-card/pull/144#issue-1453837546

FragMenthor commented 10 months ago

I would like to use this feature for presence detection, would be great. But just to leave an idea, I am using the upper part of the walls (left and right) to signal where presence is detected:

image

image