-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[tibber] Add channel for lastMeterProduction #14583
Conversation
This pull request has been mentioned on openHAB Community. There might be relevant details there: |
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.
If you can fix the space, otherwise LGTM
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.
47142b5
to
63511b7
Compare
<add-channel id="tomorrow_prices"> | ||
<type>tibber:tomorrow_prices</type> | ||
</add-channel> |
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.
This channel was added already in 3.4: #13416. I'm not sure what will happen when adding channels that already exists.
If nothing bad will happen, in principle one could just add all channels here to "play it safe". If a user would upgrade straight from 3.3 to 4.0, the instruction above would actually help.
But in this case we wouldn't need the update instructions for "add-channel" at all (conceptually), since they could be added/updated from the thing definitions, and check/upgrade simply triggered when thingTypeVersion
is bumped.
@J-N-K - I could use some input here. The next question that will come up will be whether to bump thingTypeVersion
per release, milestone or PR.
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.
Being unaware of the update feature, I added the latest channels added believing to achieve what you describes wrt different version upgrades. Will update accordingly based on @J-N-K’s answer.
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.
Going away for some days, so made the update instructions applicable only for the lastMeterProduction channel.
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.
Don't add channels that could already be present, calling .withChannel
on a ThingBuilder
will result in an IllegalArgumentException
when the channel is already present. You can use update, because removing a non-existing channel does not result in an error.
Signed-off-by: kjoglum <stiankj@online.no>
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
Signed-off-by: kjoglum <stiankj@online.no>
Signed-off-by: kjoglum <stiankj@online.no>
Signed-off-by: kjoglum <stiankj@online.no>
Adding requested channel for lastMeterProduction, part of live measurements.