eclipse-archived / smarthome

Eclipse SmartHome™ project
https://www.eclipse.org/smarthome/
Eclipse Public License 2.0
861 stars 787 forks source link

Remove static "for the next 3 hours" text #6875

Closed andreasscherbaum closed 5 years ago

andreasscherbaum commented 5 years ago

This is applied to every forecast, no matter how far in the future.

cweitkamp commented 5 years ago

May I ask why you want to change the labels? According to the documentation the API returns exactly those values.

andreasscherbaum commented 5 years ago

Because my channels look as follow:

{
        "linkedItems": [],
        "uid": "openweathermap:weather-and-forecast:home:forecastHours03#rain",
        "id": "forecastHours03#rain",
        "channelTypeUID": "openweathermap:forecasted-rain",
        "itemType": "Number:Length",
        "kind": "STATE",
        "label": "Forecasted Rain",
        "description": "Forecasted rain volume for the next 3 hours.",
        "defaultTags": [],
        "properties": {},
        "configuration": {}
      }
{
        "linkedItems": [],
        "uid": "openweathermap:weather-and-forecast:home:forecastHours06#rain",
        "id": "forecastHours06#rain",
        "channelTypeUID": "openweathermap:forecasted-rain",
        "itemType": "Number:Length",
        "kind": "STATE",
        "label": "Forecasted Rain",
        "description": "Forecasted rain volume for the next 3 hours.",
        "defaultTags": [],
        "properties": {},
        "configuration": {}
      }
{
        "linkedItems": [],
        "uid": "openweathermap:weather-and-forecast:home:forecastHours09#rain",
        "id": "forecastHours09#rain",
        "channelTypeUID": "openweathermap:forecasted-rain",
        "itemType": "Number:Length",
        "kind": "STATE",
        "label": "Forecasted Rain",
        "description": "Forecasted rain volume for the next 3 hours.",
        "defaultTags": [],
        "properties": {},
        "configuration": {}
      }
{
        "linkedItems": [],
        "uid": "openweathermap:weather-and-forecast:home:forecastHours12#rain",
        "id": "forecastHours12#rain",
        "channelTypeUID": "openweathermap:forecasted-rain",
        "itemType": "Number:Length",
        "kind": "STATE",
        "label": "Forecasted Rain",
        "description": "Forecasted rain volume for the next 3 hours.",
        "defaultTags": [],
        "properties": {},
        "configuration": {}
      }

And so on. No matter the id and forecast time, the description always says "next 3 hours". This PR does NOT change the label, it does fix the description.

davidgraeff commented 5 years ago

Shouldn't this fix be applied to the openhab2-addons repository instead?

cweitkamp commented 5 years ago

@andreasscherbaum Alright, I agree with you on the labels for the forecast channel types. They are reused for hourly and daily forecast and will fit better now. Can you incorporate your changes in the documentation (README.md) as well? Are you able to fix the translations too?

Please move this PR to https://github.com/openhab/openhab2-addons/pulls. Thanks.

andreasscherbaum commented 5 years ago

Ok, I was under the impression that this is the right repository for this change. Did not know that another repo is holding the truth original code.

@cweitkamp Do you have a pointer for me which README is affected? Then I can move this PR, and incorporate the change. Thanks

cweitkamp commented 5 years ago

No problem. The bindings have been moved recently.

Here you are.

andreasscherbaum commented 5 years ago

Ok, moved this PR over to the other repository, and also updated the README:

https://github.com/openhab/openhab2-addons/pull/4738

I think this PR here can be closed?