-
-
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
[dwdpollenflug] Initial Contribution #7298
Conversation
I think you merged or resolved conflicts using the GitHub UI... or maybe merged changes locally? If you merge commits they will show up in your PR making it hard to review. Instead you should rebase your branch to update it or resolve conflicts. Here's a pretty accurate intro on how to do that using the command line: https://dev.to/maxwell_dev/the-git-rebase-introduction-i-wish-id-had It's also possible to do the same steps using the UI in Eclipse or any other IDE that supports Git. |
I see you also wrote your steps in the issue. I think the missing part is the "force push" part. If you don't force it, it will not overwrite your existing branch... instead it will probably automatically make a merge commit for you. 😐 So it should have been:
You'll only need to force it after rebasing your branch on 2.5.x. After that you can use the normal push... until you rebase it again. Using the force option you can rewrite the history, whereas if you only add new commits these are linear, so in that case history doesn't need to be rewritten. :-) You also don't have to switch to 2.5.x before you can rebase it. This also works when you are on your dwdpollenflug branch:
You wouldn't even need a checkout of the 2.5.x branch in that case and you'll always be sure it doesn't contain any commits of your own that ended up on your local 2.5.x branch. |
@wborn thanks that was the problem. I'm always using shortcuts in my config and somehow the --force was lost in my shortcut file |
Just noticed that there are no reviewers entered on this PR. Have I to do something on my side to get my PR reviewed an merged? |
I think you've found an issue because we need to update the fallback in the CODEOWNERS file since the team got renamed after the repo got renamed: Lines 1 to 5 in 45cf759
|
@wborn thanks |
As weather is getting better this days in Germany and with it the pollen pollution, is there a way how to promote this PR do get a quicker review? |
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.
Thanks for your contribution. I have left some comments inside.
...ug/src/main/java/org/openhab/binding/dwdpollenflug/internal/DWDPollenflugHandlerFactory.java
Outdated
Show resolved
Hide resolved
bundles/org.openhab.binding.dwdpollenflug/src/main/resources/ESH-INF/thing/region.xml
Show resolved
Hide resolved
<properties> | ||
<property name="region_id"/> | ||
<property name="region_name"/> | ||
<property name="partregion_name"/> | ||
</properties> |
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.
I don't think you should add these properties, they just reflect the configuration.
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.
I removed region_id! The region_name and partregion_name I want to leave there for control reasons for those who use text-configuration, whether the correct region is loaded.
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.
Do you agree leaving region_name and partregion_name as properties?
bundles/org.openhab.binding.dwdpollenflug/src/main/resources/ESH-INF/thing/region.xml
Outdated
Show resolved
Hide resolved
.../src/main/java/org/openhab/binding/dwdpollenflug/internal/DWDPollenflugBindingConstants.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/openhab/binding/dwdpollenflug/internal/DWDPollenflugBindingConstants.java
Outdated
Show resolved
Hide resolved
...wdpollenflug/src/main/java/org/openhab/binding/dwdpollenflug/internal/dto/DWDPollenflug.java
Outdated
Show resolved
Hide resolved
...llenflug/src/main/java/org/openhab/binding/dwdpollenflug/internal/dto/DWDPollenflugJSON.java
Outdated
Show resolved
Hide resolved
...llenflug/src/main/java/org/openhab/binding/dwdpollenflug/internal/dto/DWDPollenflugJSON.java
Outdated
Show resolved
Hide resolved
...ng.dwdpollenflug/src/main/java/org/openhab/binding/dwdpollenflug/internal/dto/DWDRegion.java
Outdated
Show resolved
Hide resolved
...ng.dwdpollenflug/src/main/java/org/openhab/binding/dwdpollenflug/internal/dto/DWDRegion.java
Outdated
Show resolved
Hide resolved
</channel-type> | ||
|
||
<channel-type id="updated"> | ||
<kind>trigger</kind> |
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.
Why is this needed if users can just trigger on changes to the "Update Time" 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.
I thought about use case like: don't need to link a item to the refresh channel because I don't want to display anywhere but just want to trigger a rule on refresh
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.
Removed trigger channel!
|
||
<channel-type id="update"> | ||
<item-type>DateTime</item-type> | ||
<label>Update time</label> |
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.
The first letter of every word in a label should be capitalized.
<label>Update time</label> | |
<label>Update Time</label> | |
Please update elsewhere as appropriate.
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.
Is this an OpenHAB convention? Should I although do it like "Refresh In Minutes" or like "Refresh in Minutes". And should it be the same in translation file?
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.
Using upper-case letters as first letters in labels is an openHAB convention, yes. This also applies to translations. Please do not use something like "In Minutes". If the unit is set in the description, the UI should properly display the unit.
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.
Fixed all labels to upper case and removed in Minutes
public void handleCommand(ChannelUID channelUID, Command command) { | ||
} |
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.
You at least handle a RefreshType command
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.
Just for my understanding of this, when ist RefreshType command triggered?
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.
Please check my fix
final ScheduledFuture<?> localPollingJob = this.pollingJob; | ||
if (localPollingJob == null || localPollingJob.isCancelled()) { |
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.
final ScheduledFuture<?> localPollingJob = this.pollingJob; | |
if (localPollingJob == null || localPollingJob.isCancelled()) { | |
final ScheduledFuture<?> localPollingJob = this.pollingJob; | |
final DWDPollenflug pollenflug = this.pollenflug; | |
if (localPollingJob == null || localPollingJob.isCancelled()) { | |
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.
please check my fix.
|
||
public void poll() { | ||
logger.debug("Polling"); | ||
requestRefresh().handle((pollenflug, e) -> { |
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.
Instead of 'e', please give the variable a name that at least gives a hint as to what the datatype is.
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.
Please check my fix.
@J-N-K and @cpmeister I have refactored the complete DTO package. I would ask you to review it again. Thanks |
And I just noticed a problem with translation.
The labels of the channels are not translated. I thought it should work like this:
|
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.
Thanks for your fast response. Already looks much better. I'm glad we already got @cpmeister as a second reviewer. That'll speed up the whole process.
...main/java/org/openhab/binding/dwdpollenflug/internal/handler/DWDPollenflugBridgeHandler.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/openhab/binding/dwdpollenflug/internal/DWDPollenflugBindingConstants.java
Outdated
Show resolved
Hide resolved
...main/java/org/openhab/binding/dwdpollenflug/internal/handler/DWDPollenflugBridgeHandler.java
Outdated
Show resolved
Hide resolved
...main/java/org/openhab/binding/dwdpollenflug/internal/handler/DWDPollenflugRegionHandler.java
Outdated
Show resolved
Hide resolved
...main/java/org/openhab/binding/dwdpollenflug/internal/handler/DWDPollenflugRegionHandler.java
Outdated
Show resolved
Hide resolved
...main/java/org/openhab/binding/dwdpollenflug/internal/handler/DWDPollenflugRegionHandler.java
Outdated
Show resolved
Hide resolved
...main/java/org/openhab/binding/dwdpollenflug/internal/handler/DWDPollenflugBridgeHandler.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Johannes DerOetzi Ott <[email protected]>
Signed-off-by: Johannes DerOetzi Ott <[email protected]>
Signed-off-by: Johannes DerOetzi Ott <[email protected]>
Signed-off-by: Johannes DerOetzi Ott <[email protected]>
Signed-off-by: Johannes DerOetzi Ott <[email protected]>
Signed-off-by: Johannes DerOetzi Ott <[email protected]>
Signed-off-by: Johannes DerOetzi Ott <[email protected]>
Signed-off-by: Johannes DerOetzi Ott <[email protected]>
Signed-off-by: Johannes DerOetzi Ott <[email protected]>
Signed-off-by: Johannes DerOetzi Ott <[email protected]>
Signed-off-by: Johannes DerOetzi Ott <[email protected]>
Signed-off-by: Johannes DerOetzi Ott <[email protected]>
Travis tests were successfulHey @DerOetzi, |
1 similar comment
Travis tests were successfulHey @DerOetzi, |
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
@cpmeister Thank you as well for the help |
* [DWDPollenflug] New Binding retry Signed-off-by: Johannes DerOetzi Ott <[email protected]> Signed-off-by: Eugen Freiter <[email protected]>
* [DWDPollenflug] New Binding retry Signed-off-by: Johannes DerOetzi Ott <[email protected]>
* [DWDPollenflug] New Binding retry Signed-off-by: Johannes DerOetzi Ott <[email protected]>
* [DWDPollenflug] New Binding retry Signed-off-by: Johannes DerOetzi Ott <[email protected]>
* [DWDPollenflug] New Binding retry Signed-off-by: Johannes DerOetzi Ott <[email protected]> Signed-off-by: CSchlipp <[email protected]>
* [DWDPollenflug] New Binding retry Signed-off-by: Johannes DerOetzi Ott <[email protected]>
* [DWDPollenflug] New Binding retry Signed-off-by: Johannes DerOetzi Ott <[email protected]>
* [DWDPollenflug] New Binding retry Signed-off-by: Johannes DerOetzi Ott <[email protected]>
* [DWDPollenflug] New Binding retry Signed-off-by: Johannes DerOetzi Ott <[email protected]>
* [DWDPollenflug] New Binding retry Signed-off-by: Johannes DerOetzi Ott <[email protected]> Signed-off-by: Daan Meijer <[email protected]>
* [DWDPollenflug] New Binding retry Signed-off-by: Johannes DerOetzi Ott <[email protected]>
The "Deutsche Wetterdienst" (DWD) reports the current pollen count index for Germany on a daily base and a forecast for tomorrow and the day after tomorrow. This new binding allows you to retrieve this data for your region or partregion.
I added the information to this thread:
https://community.openhab.org/t/new-binding-dwdpollenflug/95596
Unfortunately I don't understand what I'm doing wrong at my git workflow. Can someone who knows about it have a look at my workflow description at #7289