You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.
The hassio addon uses the same regex for segments as it does for the other map colors (which expect single hex rgba values link
As a result, the addon rejects "valid" inputs for the segments option (e.g. ["#19A1A1", "#7AC037", "#DF5618", "#F7C841"]) while inputs that satisfy the regex (e.g. "#AABBCC") will cause the internal ICBINV app to fail, because it expected a comma-separated list instead of a single value.
To Reproduce
a)
Go to addon configuration
In section "mapColors" add segments: "#ffffff" and save
Scroll down to log
Observe internal error
b)
Go to addon configuration
In section "mapColors" add segments: ["#19A1A1", "#7AC037", "#DF5618", "#F7C841"] and click save
Observe addon configuration error due to regex mismatch
Expected behavior
Using segments: ["#19A1A1", "#7AC037", "#DF5618", "#F7C841"] yields the expected behavior and produces no regex errors
Using segments: "#ffffff" produces a configuration error instead of an internal error in the app
Screenshots
error for case a):
error for case b):
System
Supervisor version: 2022.10.2
Host system version: HassOS 9.0
The text was updated successfully, but these errors were encountered:
Which addon?
I can't believe it's not valetudo
Describe the bug
ICBINV uses a comma separated list of values for the segment colors
(see default here: https://github.com/Hypfer/ICantBelieveItsNotValetudo/blob/master/lib/MapDrawer.js#L37)
The hassio addon uses the same regex for
segments
as it does for the other map colors (which expect single hex rgba values linkAs a result, the addon rejects "valid" inputs for the
segments
option (e.g.["#19A1A1", "#7AC037", "#DF5618", "#F7C841"]
) while inputs that satisfy the regex (e.g."#AABBCC"
) will cause the internal ICBINV app to fail, because it expected a comma-separated list instead of a single value.To Reproduce
a)
segments: "#ffffff"
and saveb)
segments: ["#19A1A1", "#7AC037", "#DF5618", "#F7C841"]
and click saveExpected behavior
Using
segments: ["#19A1A1", "#7AC037", "#DF5618", "#F7C841"]
yields the expected behavior and produces no regex errorsUsing
segments: "#ffffff"
produces a configuration error instead of an internal error in the appScreenshots
error for case a):
error for case b):
System
The text was updated successfully, but these errors were encountered: