Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

date.* event.* are reported as missing #171

Open
h3llrais3r opened this issue Nov 25, 2024 · 8 comments · Fixed by #175
Open

date.* event.* are reported as missing #171

h3llrais3r opened this issue Nov 25, 2024 · 8 comments · Fixed by #175
Milestone

Comments

@h3llrais3r
Copy link

h3llrais3r commented Nov 25, 2024

Any idea why some date functions seem to be marked as missing entities?
image

This is happening since the last upgrade, but I have no idea where to look for this...

@twmcelroy
Copy link

Are these helpers? I am seeing many helpers marked as missing in version 0.6.5 and HA Core 11.2

@dummylabs
Copy link
Owner

dummylabs commented Nov 26, 2024

Yep, date was added as a platform in recent version along with a few helpers.
@h3llrais3r @jhemak could you provide a snippet of Lovelace code which triggers WM? Thanks in advance.

As a temporary workaround date can be added to ignored items in WM config.

@dummylabs
Copy link
Owner

dummylabs commented Nov 26, 2024

I've tested the latest version a bit. WM does not trigger for occurrences like this:
parseInt((Date.now() - Date.parse(x)) / 3600000);
However, if you have a variable named date and use it as date.something, WM will consider it as a date entity.

If this is your case, the solution could be to rename the variable so that it differs from "date".

@Mariusthvdb
Copy link
Contributor

Mariusthvdb commented Nov 26, 2024

seeing a related issue on event

can this be added here, on would you require a separate issue tracker for it.

Ive renamed variables to non reserved words for some of the events, but there is an actual event for the folder_watcher that is still triggering the Watchman logic

Scherm­afbeelding 2024-11-26 om 11 13 30

@dummylabs dummylabs changed the title Date functions missing in lovelace date.* event.* are reported as missing Nov 26, 2024
@dummylabs
Copy link
Owner

dummylabs commented Nov 26, 2024

@Mariusthvdb Since events do not have persistent states besides unknown, they should be removed from the watching list. This will be addressed in a future fix. Not sure about date.* yet.

@dummylabs
Copy link
Owner

Fix is available in 0.7.0 beta, can be downloaded via HACS.

@h3llrais3r
Copy link
Author

h3llrais3r commented Nov 26, 2024

Yep, date was added as a platform in recent version along with a few helpers. @h3llrais3r @jhemak could you provide a snippet of Lovelace code which triggers WM? Thanks in advance.

As a temporary workaround date can be added to ignored items in WM config.

image

So it's probably coming from this part?
@dummylabs If I rename the variable, it should also be fixed, right?
EDIT: just tested it, but after a rename, it still reports it as missing
image

PS: Thanks for the fix anyway!

@dummylabs
Copy link
Owner

Reopen the issue to increase its visibility to users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants