[energidataservice] Provide example configuration for YAML#19435
[energidataservice] Provide example configuration for YAML#19435lolodomo merged 1 commit intoopenhab:mainfrom
Conversation
|
@lolodomo - I noticed that channels:
electricity#grid-tariff:
type: datahub-price
config:
chargeTypeCodes: "CD,CD R"
start: StartOfYearwhereas it can be omitted in DSL: Channels:
Number : electricity#grid-tariff [ chargeTypeCodes="CD,CD R", start="StartOfYear" ]I don't know if this was already discussed and decided, just wanted to let you know in case not, since I'm trying this out now for the first time and seeing it with new eyes. 🙂 |
|
@jlaur : in your case, you don't need to set the "type" field but the "itemType" field to value "Number". |
0097b65 to
f50ed88
Compare
Thanks, that worked as well. I didn't think of this much before, but it seems |
When the channel type is specificied, the accepted item type is retrieved from the channel type. |
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
f50ed88 to
e8eb720
Compare
My thinking is that this should be derived from the channel being configured, i.e. this should be possible: channels:
electricity#grid-tariff:
config:
chargeTypeCodes: "CD,CD R"
start: StartOfYearor: Channels:
electricity#grid-tariff [ chargeTypeCodes="CD,CD R", start="StartOfYear" ]I didn't test the DSL version, probably it won't parse the syntax validation. Just a thought, and obvously not related to this PR. It just feels strange having to either provide channel type or item type when both are redundant and could (at least theoretically) be derived from the channel being configured. |
Regression of openhab#19435 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Regression of #19435 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Based on documentation: https://next.openhab.org/docs/configuration/yaml.html