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
471 stars 67 forks source link

Overlay function only works on first object in an object group #75

Closed greyhound3 closed 2 years ago

greyhound3 commented 2 years ago

If the objects in the group are resorted (with the arrow up/down symbols), the overlay is only displayed if the first object in the list is pressed. Tested using Firefox v96.0.1 or Google Chrome v97.0.4692.71 on MacOs v11.6 with floor3d-card v 1.1.13 If more information is needed, I will post it. It is not critical for me, I just wanted to mention it.

grafik grafik grafik
adizanni commented 2 years ago

Hello @greyhound3, it is true. I'm having some trouble to keep the consistency of the card configuration. The problem is that I have a many to many relationship between the objects and the entities and it is unmangeable in the code. What-if you assign the object_id to another entity. I will try to address your specific issue but I think I need to perform a deeper restructuring in order to limit the association between objects and entities.

greyhound3 commented 2 years ago

Thank you for your answer. The problem is really not bothering me, I just thought that I stumbled upon something fishy, which - when handeled otherwise - would or could solve other problems. I used your suggestion in fact some time ago to turn a lamp with more than one bulb in it, since HA complained about not being able to toggle a group (not implemented), but using singular entities for every bulb worked and everything is fine!

adizanni commented 2 years ago

You are right your use case is legitimate, the problem is when I add a new feature, I need to manage more and more cases. So I will see if I can fix this easily

adizanni commented 2 years ago

Hello @greyhound3, I have checked your card configuration and I must say that you have created something that I didn't even know it could work. For me all entities needs a type3d and you managed to create an entity without type3d.By design overlay should only show the value of the entity associated to a clicked object , but the entity need to be of some type (light, camera, gesture, etc.). Second what do you want to achieve ? You have created a group of objects that belongs to different rooms and you associate only one sensor entity (sensor.temperature), is it intentional ? Third, even with all these conditions, the overaly should show the value of sensor.temperature when you click on any of the objects of the group...... I'm not sure I'm clear

greyhound3 commented 2 years ago

I just wanted the 3d model as interactive as possible and to show the outside temperature on clicking any window.

adizanni commented 2 years ago

Ok it is clear. I confirm the bug and I have a fix for next release

adizanni commented 2 years ago

v1.1.14 is released and it should fix this issue. Please verify

greyhound3 commented 2 years ago

v1.1.14 fixed it, works perfectly! You did it, thank you !!

Edit: You know, what is coming as a next request: "how do I get this to transparently overlay on a surface...". LOL But not from me, I am happy, issue is closed.