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
450 stars 65 forks source link

ENTITIES LIST INCOMPLETE #86

Closed VITCHEPF closed 2 years ago

VITCHEPF commented 2 years ago
GOOGLE CHROME Version 98.0.4758.102 64 bits **Description of problem:** ERRORS FOUND 1) In the "Type and Object" list, only 2 options appear to be configured: -Entity_Template: -Object: 2) In the Entity_Template field, the filling options must be entered manually (light, color, etc...), as they do not work with the double click; 3) After filling in the fields (Entity, Entity_Template and Object) and selecting the SAVE option, the card crashes and is deleted from the interface, not allowing the option "ADD NEW CARD" to be selected again for this page

Javascript errors shown in the web inspector (if applicable):

Additional information:

ENTITY TEMPLATE1 ENTITY TEMPLATE2 ENTITY TEMPLATE3

ENTITY TEMPLATE4

adizanni commented 2 years ago

Hello @VITCHEPF, I do not get your problem. The Entity Template should be used to transform the value of the state of the entity and is using the Javascript notation: [[[ javascript instructions ]]] and you use the $entity macro to refer the state value. Example: [[[ ($entity > 20) ? 'hot' : 'cold' ]]] and then you can use the template value in a Text, Hide, Show, Color 3d type. Tell me if it is clear. Also when the problem with the card crash happen you can solve it by using the "raw configuration editor" in the upper right corner

VITCHEPF commented 2 years ago

Hi adizzani. According to your video we should have more options to be configured in the card. I cannot see these options in my card (ser attached picture)

Screenshot_20220302-181852

VITCHEPF commented 2 years ago

I have only "entitiy template" and "object', and the card crashes after be filled.

adizanni commented 2 years ago

The options are appearing when you select the type of the entity with the type3d list box. You just click on the type section to expand and see all parameters

adizanni commented 2 years ago

You have to expand the light section with the arrow at the right of the light label

VITCHEPF commented 2 years ago

It's probably a problem with the Javascript Module, which is not opening the Options menu correctly and filling with texts that make no sense. See the sequence of images below:

ENTITY TEMPLATE

ENTITY TEMPLATE1

VITCHEPF commented 2 years ago

The light label also don't appear in my menu.

adizanni commented 2 years ago

Please open the web console. In chrome it is under "more tools" "web developer tools" and copy paste the content here if you see errors. I've never seen that problem!

adizanni commented 2 years ago

Maybe it is related to a wrong management of a character set, please paste your log here while the config editor is open

VITCHEPF commented 2 years ago

Ciao @ADIZANNI, please see if the information below can help you to find the error:

TELA1

VITCHEPF commented 2 years ago

When I open de "web developer tools" these are the error codes that appear:

1) The errors are relative to other repositories I have installed on HA:

ERRO LIST

2) At the end of Floor3DCard this error appears:

ERRO LIST 2

VITCHEPF commented 2 years ago

Hi @adizanni,

I believe I have found the problem of not showing the two dropdown menus (Action and 3D Type), in Chrome and Edge Browser. In both browsers the element "paper-dropdown menu" doesn't display the dropdown menu, and the list items do not appear as a stylized "menu", but just a list of items that appear on the page.

The problem is in the rendering of this component in the browsers above. Do you have any solution or suggestion for this problem?

If you search on the internet you will find many cases that had a problem with this component.

adizanni commented 2 years ago

The paper-dropdown menu is in the card since day 1 (it is now out since more than 1 year) I have never received this kind of feedback. Please go into "show code editor" and cut and paste your config yaml code. Which, by the way, can also be used as a workaround when the visual editor is not good enough

VITCHEPF commented 2 years ago

Hi see below the code:

type: custom:floor3d-card entities:

If I include manually the line in Bold below, because I don't have the interface to input this data, the card stop to work and crashes:

entities:

VITCHEPF commented 2 years ago

Additional information: the problem is not related to the Operating System. because I tested on Windows 10 Home, Windows 10 Pro and Android 9 and they all have the same error.

adizanni commented 2 years ago

Have you tried to start from a blank card ? I do not see anything wrong with your configuration. Unfortunately I cannot reproduce the issue in my environment and I have not received other feedback, neither here nor in the forum. Today I have a bit more time so I will try to dig

VITCHEPF commented 2 years ago

Now I started with a new Panel, Blank Card and New Page, but unfortunatelly the error still the same: ERRO

VITCHEPF commented 2 years ago

As I told you before, I prove to type manually the proprieties below (Bold), but after include this lines the rrendering stops working and the card freeze:

type: custom:floor3d-card entities:

ERRO

VITCHEPF commented 2 years ago

To make the page and the card open again, I need to open the Raw Editor and delete the included lines manually

adizanni commented 2 years ago

Please put always the log in the console as you did before. Try to start with a simple model you download from the samples in SweetHome3d (no levels, no fancy objects, no plugin. etc). If everything is working including the editor and the possibility to add lights, switch to your model. Start from an empty card: do not add any lights and tell me if the model is displayed and the console is not showing any issue. Start by adding the light in the editor and show me the console error (if any). If the visual editor is always having the same problem with the dropdown lists, switch to the code editor. In your config above: remove the angle: it is only useful when you also put target object or target direction which is not the case for you; but it should not hurt. A light requires only the entity, the object_id the type (light), the light section and the lumens to work It is difficult to debug if I do not understand why you have a problem with the editor, I have not been reported of this problem from anybody else and I cannot reproduce it in my environment

VITCHEPF commented 2 years ago

STEP 1: New Panel and New Card empty created

ERRO0

STEP 2: Open the Floor3d Card --> Entity --> Type and Object The paper-dropdown menu Action and the paper-dropdown menu 3D Type do not appear.

ERRO

STEP 3: Loading a Basic 3D Model justo to check what happens

ERRO1

In my opinion, not showing the 3D Type paper-dropdown menu object is not related to incorrectly typed or created code, but to some incompatibility between the paper-dropdown menu object and my Home Assistant in Portuguese (BR) - maybe. Do you have contact with any other users in Brazil who are using this card?

It seems that this object is not being created in memory, because in addition to not appearing in the interface, when I try to manually assign a value to it, the 3d card crashes

VITCHEPF commented 2 years ago

Would be possible for you to generate a new code, just for my test, changing the objects "paper-dropdown menu Action" and "paper-dropdown menu 3D Type" by another input object?

So I could test if the interface will load correctly or if there is some other incompatibility problem with my system.

adizanni commented 2 years ago

I'm loading a new official version where I have replaced the paper-dropdown with the ha-paper-dropdown which is the one used in lovelace. I've done some test to be sure I'm not breaking things that work in my environment, hope that this can fix the issue in your environment. the new release with the fix will be 1.3.4. If this is not working I will ask you to create an input_select entity so that you can test the behaviour of the ha-dropdown in the standard gui of Home Assistant, and if it does not work I'm sorry but I will not accept to work on a bug that is also present in the official HA gui

VITCHEPF commented 2 years ago

Can you please compare my generated code with your generated code, for the component "paper-dropdown menu Action", to see if there are differences?

I Splitted in 3 parts

1) Complete Routine "paper-dropdown menu Action"

DROP1

2) PICTURE 2 DROP2

3) PICTURE 3

DROP3

================================================================================ I'm suggesting to compare, because I found some links on the internet that indicate a "possible error" in the construction of the code

https://stackoverflow.com/questions/37841989/polymer-paper-dropdown-menu-not-rendered-correctly-in-browser

VITCHEPF commented 2 years ago

Release 1.3.4 and HA Input Select Test:

DROP1

DROP2

VITCHEPF commented 2 years ago

Starting with a new 3D card

ERRO

adizanni commented 2 years ago

Please send me the html generated for the input_select and the code generated for the type3d field.

adizanni commented 2 years ago

Try to install the new beta version 1.3.5-beta. I've done a recommended operation to load the ha ui components to be sure that they are correctly rendered in the browser. I'm pretty sure this will not change anything for you but in case it will let me know rapidly, I will turn the patch into a general release

adizanni commented 2 years ago

Also please try to do a test with this card editor it is using the same contols as me (I got the majority of the editor code from it). https://github.com/custom-cards/bar-card

adizanni commented 2 years ago

Another question: have you upgraded HA to 2022.3.x ? Found this article https://developers.home-assistant.io/blog/2022/02/18/paper-elements/

adizanni commented 2 years ago

Hello @VITCHEPF as it finally turned out, you discovered an important issue that appears after upgrade to 2022.3 (which is not yet the case for me). I'm working to quickly switch to MWC elements, I will post a new release when ready. The patches I've posted in beta are not working.....

VITCHEPF commented 2 years ago

Thanks for the feedback. I'am look forward to the new version.

VITCHEPF commented 2 years ago

I see that: https://developers.home-assistant.io/blog/2022/02/18/paper-elements/

adizanni commented 2 years ago

It is not a minor change and it was announced without giving it the right importance

VITCHEPF commented 2 years ago

Hi, version 1.3.5 I uploaded and for me the problem still the same: ERRO

adizanni commented 2 years ago

Hello @VITCHEPF release 1.3.5-HF1 is out with the paper elements fix (I did a wrong release right before). Please verify if it is working for you and thanks again for your resiliency in supporting your case, otherwise I would have lost a lot of time to discover and fix the problem

adizanni commented 2 years ago

Still down! I apologize. Need to rollback release

VITCHEPF commented 2 years ago

Hi, Sorry but I didn't understand If the actual version available 1.3.4 it's the final version with the paper elements fixed or not?

adizanni commented 2 years ago

If you moved to HA 2022.3 there is no version fixing the issue for the moment (i'm working at it), it is anyway better to revert to 1.3.4 because all 1.3.5.x were deleted

adizanni commented 2 years ago

v1.3.6 is out there to fix the issue, please give me feedback and thanks for the patience......

VITCHEPF commented 2 years ago

Congratulations! You solved the biggest problem.

Now it's minor adjustments:

See below:

ERRO

ERRO1

ERRO2

VITCHEPF commented 2 years ago

Additionally

ERRO3

adizanni commented 2 years ago

In reverse order:

adizanni commented 2 years ago

For everybody's reference, if you are looking for the solution to the paper element issue introduced by HA 2022.3, I found this repository (https://github.com/piitaya/lovelace-mushroom) gives the most elegant solution.

VITCHEPF commented 2 years ago

I adizanni, just as feedback. I did today some tests with the last release and it seems that the main functions are ok

I will be in touch to let you know if anything strange happens.

Tks TESTE

VITCHEPF commented 2 years ago

I remember seeing something like a "double click" on the object to turn the lamp on and off. Am I right? What do I need to configure this?

adizanni commented 2 years ago

Hello @VITCHEPF for discussion it is better to use the forum, you can also send me direct messages. There is nothing to configure for the double click. By default if you double click on the object associated to the light, it should turn on and off the light, if you want to double-click on another object to turn on the light (ex a switch) you have to use the 3d type called "gesture". I think I have solved the issue with the menu (at least for the 3d type field); give me feedback and then we can close the issue.