Closed andreasscherbaum closed 5 years ago
May I ask why you want to change the labels? According to the documentation the API returns exactly those values.
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.
Shouldn't this fix be applied to the openhab2-addons repository instead?
@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.
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
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?
This is applied to every forecast, no matter how far in the future.