-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[energidataservice] Provide example configuration for YAML #19435
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
Conversation
@lolodomo - I noticed that channels:
electricity#grid-tariff:
type: datahub-price
config:
chargeTypeCodes: "CD,CD R"
start: StartOfYear whereas 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: StartOfYear or: 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you
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