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

State icon depending on state value #61

Closed
braindead1 opened this issue Sep 7, 2020 · 4 comments
Closed

State icon depending on state value #61

braindead1 opened this issue Sep 7, 2020 · 4 comments
Assignees
Labels
bug 🐛 Something isn't working
Projects

Comments

@braindead1
Copy link

If I remember correctly it was possible to define a state icon depending on the state value in a previous version. I believe this was done in the JSON.

It would be great if this could be implemented in the UI. Instead of just offering the possibility to enter an icon name, it should be possible to enter JSON similar to state style and display variant.

{
    "true": "account",
    "false": "account-off"
}

image

If possible, it would be great to have the following for numeric values:

{
    "<20": "battery-20",
    ">=20": "battery"
}
@Zefau Zefau self-assigned this Sep 7, 2020
@Zefau Zefau added the bug 🐛 Something isn't working label Sep 7, 2020
@Zefau Zefau added this to the ROADMAP v1.0.0 milestone Sep 7, 2020
@Zefau
Copy link
Owner

Zefau commented Sep 7, 2020

The input was not parsed as json. This has been fixed with 1.0.0-beta.17. Using <, <= and >, >= as well as != should already be possible (and now working as well).

@braindead1
Copy link
Author

I have installed v1.0.0-beta.17.

Entering JSON for boolean states works as expected.

It is not possible to just enter the name of an icon as there is directly the message that the JSON is not valid.

image

I tried to use the following JSON:

{
    "<=40": "battery-40",
    ">40": "battery"
}

For the battery state it has no effect and the default icon is used. For a slef-created state no icon is displayed.

@Zefau
Copy link
Owner

Zefau commented Sep 8, 2020

Should now be working with 1.0.0-beta.18.

@braindead1
Copy link
Author

Fixed in v1.0.0-beta.19

@Zefau Zefau added release and removed verify-fix labels Sep 12, 2020
@Zefau Zefau added this to DONE in v1.x.x Sep 2, 2021
@Zefau Zefau removed this from the ROADMAP v1.0.0 milestone Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
No open projects
Development

No branches or pull requests

2 participants