Allow one or more format to be used#2182
Conversation
e40fc6d to
327d47e
Compare
I fount that we can have |
|
@MaxVerevkin any thoughts on this approach to allow one or more format (either as how formats are currently configured, or as a list of format configs)? |
327d47e to
8cffbdd
Compare
|
@ammgws, any concerns with this approach? I only added support to the time block, but it could be added to other blocks. For blocks that already support |
8cffbdd to
1a9b169
Compare
|
On phone now but just to double check before going further, are the examples in your parent comment still the same? |
|
@ammgws , yes the example config works as before (well except the last time block, which fails on purpose) The change I made the other day was to keep the behavior that the first format keeps the Your question did raise an issue for me, what if a block does specify a default for |
1a9b169 to
00e1d7b
Compare
|
I've added support in two other blocks as examples: |
00e1d7b to
325e9b4
Compare
Currently this has only been applied to the time block, but any block that doesn't have formats for specific states/conditions could use this do allow one or more format, while still being able to continue using
formatandformat_alt. (This could work as a fix to #2163)One drawback about this is that I was unable to figure out how to be able to keep the
deny_unknown_fieldson theConfigThis will allow configs to be specified in any of these ways: