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

I get the year 1001 in the card Bottles by Vintage #20

Open
rwez opened this issue Mar 22, 2023 · 1 comment
Open

I get the year 1001 in the card Bottles by Vintage #20

rwez opened this issue Mar 22, 2023 · 1 comment

Comments

@rwez
Copy link

rwez commented Mar 22, 2023

In the card Bottles by Vintage I get the year 1001, presumably for the bottles which have no vintage, like some cava's or champagnes. see screenshot.
Screenshot 2023-03-22 at 09 54 11

@soggypete
Copy link

soggypete commented May 17, 2023

This seems to be for wines that are NV wines

Edit: I read your post in more detail and saw that you've actually come to the same conclusion I have, sorry! I just saw this on my own HA this evening and came to the same conclusion. No idea how to get around this but would love to find a solution.

Edit 2: Solved it! Solution is to add something like the following to your lovelace code, depending on how your table/sensors are arranged:

- name: Vintage
data: Vintage
modify: >-
if(parseFloat(x).toFixed(0) == 1001) {"N.V."}
else{parseFloat(x).toFixed(0)}

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

No branches or pull requests

2 participants