Add template weather forecast documentation#42524
Conversation
✅ Deploy Preview for home-assistant-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
There was a problem hiding this comment.
Pull request overview
This PR adds documentation for the Template Weather Forecast feature, explaining how to properly structure weather forecast data for the three supported forecast types: hourly, daily, and twice daily. The documentation describes the expected data format and timing requirements for each forecast type.
- Adds a new "Weather forecast data" section explaining how forecast templates should structure their data
- Documents requirements for hourly (24 data points starting from current hour), daily (midnight-based increments), and twice daily (12-hour period) forecasts
- Includes information about the mandatory
is_daytimefield for twice daily forecasts
|
|
||
| The `hourly` forecast should contain 24 dictionaries, where each dictionary represents a specific hour within the next 24 hour period. The `hourly` data should start at the current hour and end 24 hours from that point. The `datetime` in each dictionary should represent the start of the hour in your local timezone. | ||
|
|
||
| #### Daily Weather Forecast |
There was a problem hiding this comment.
The heading uses title-style capitalization ("Daily Weather Forecast") but should use sentence-style capitalization according to the documentation standards. It should be "Daily weather forecast".
| #### Daily Weather Forecast | |
| #### Daily weather forecast |
|
|
||
| The `daily` forecast should contain dictionaries, where each dictionary represents a specific day within any desired timeframe. The `daily` data should start at midnight tonight and end on the last day of your desired timeframe, incrementing 1 day at a time. The `datetime` in each dictionary should represent midnight for each night in your local timezone. | ||
|
|
||
| #### Twice Daily Weather Forecast |
There was a problem hiding this comment.
The heading uses title-style capitalization ("Twice Daily Weather Forecast") but should use sentence-style capitalization according to the documentation standards. It should be "Twice daily weather forecast".
| #### Twice Daily Weather Forecast | |
| #### Twice daily weather forecast |
|
|
||
| #### Hourly Weather Forecast | ||
|
|
||
| The `hourly` forecast should contain 24 dictionaries, where each dictionary represents a specific hour within the next 24 hour period. The `hourly` data should start at the current hour and end 24 hours from that point. The `datetime` in each dictionary should represent the start of the hour in your local timezone. |
There was a problem hiding this comment.
The phrase "24 hour period" should be hyphenated when used as a compound adjective. It should be "24-hour period".
| The `hourly` forecast should contain 24 dictionaries, where each dictionary represents a specific hour within the next 24 hour period. The `hourly` data should start at the current hour and end 24 hours from that point. The `datetime` in each dictionary should represent the start of the hour in your local timezone. | |
| The `hourly` forecast should contain 24 dictionaries, where each dictionary represents a specific hour within the next 24-hour period. The `hourly` data should start at the current hour and end 24 hours from that point. The `datetime` in each dictionary should represent the start of the hour in your local timezone. |
|
|
||
| #### Twice Daily Weather Forecast | ||
|
|
||
| The `twice_daily` forecast should contain dictionaries, where each dictionary represents a specific 12 hour period within any desired timeframe. The `twice_daily` should start at the closest 12 hour period and end on the last 12 hour period of your desired timeframe. The `datetime` in each dictionary should represent midnight or noon for each day in your local timezone. Keep in mind, `is_daytime` is mandatory in every dictionary output to `twice_daily` forecasts. |
There was a problem hiding this comment.
The phrase "12 hour period" should be hyphenated when used as a compound adjective. It should be "12-hour period".
| The `twice_daily` forecast should contain dictionaries, where each dictionary represents a specific 12 hour period within any desired timeframe. The `twice_daily` should start at the closest 12 hour period and end on the last 12 hour period of your desired timeframe. The `datetime` in each dictionary should represent midnight or noon for each day in your local timezone. Keep in mind, `is_daytime` is mandatory in every dictionary output to `twice_daily` forecasts. | |
| The `twice_daily` forecast should contain dictionaries, where each dictionary represents a specific 12-hour period within any desired timeframe. The `twice_daily` should start at the closest 12-hour period and end on the last 12-hour period of your desired timeframe. The `datetime` in each dictionary should represent midnight or noon for each day in your local timezone. Keep in mind, `is_daytime` is mandatory in every dictionary output to `twice_daily` forecasts. |
|
|
||
| #### Twice Daily Weather Forecast | ||
|
|
||
| The `twice_daily` forecast should contain dictionaries, where each dictionary represents a specific 12 hour period within any desired timeframe. The `twice_daily` should start at the closest 12 hour period and end on the last 12 hour period of your desired timeframe. The `datetime` in each dictionary should represent midnight or noon for each day in your local timezone. Keep in mind, `is_daytime` is mandatory in every dictionary output to `twice_daily` forecasts. |
There was a problem hiding this comment.
There are two spaces between sentences in this line. According to the style guide, only one space should be used after periods. The double space appears after "desired timeframe." and before "The datetime".
| The `twice_daily` forecast should contain dictionaries, where each dictionary represents a specific 12 hour period within any desired timeframe. The `twice_daily` should start at the closest 12 hour period and end on the last 12 hour period of your desired timeframe. The `datetime` in each dictionary should represent midnight or noon for each day in your local timezone. Keep in mind, `is_daytime` is mandatory in every dictionary output to `twice_daily` forecasts. | |
| The `twice_daily` forecast should contain dictionaries, where each dictionary represents a specific 12 hour period within any desired timeframe. The `twice_daily` should start at the closest 12 hour period and end on the last 12 hour period of your desired timeframe. The `datetime` in each dictionary should represent midnight or noon for each day in your local timezone. Keep in mind, `is_daytime` is mandatory in every dictionary output to `twice_daily` forecasts. |
|
|
||
| {% endconfiguration %} | ||
|
|
||
| ### Weather Forecast data |
There was a problem hiding this comment.
The heading uses title-style capitalization ("Weather Forecast data") but should use sentence-style capitalization according to the documentation standards. It should be "Weather forecast data".
| ### Weather Forecast data | |
| ### Weather forecast data |
|
|
||
| The weather forecast options should return a list of dictionaries, where each dictionary contains [forecast information](https://www.home-assistant.io/integrations/weather/#action-weatherget_forecasts) for the current timeframe. The data is slightly different for each forecast type: `hourly`, `daily`, and `twice_daily`. | ||
|
|
||
| #### Hourly Weather Forecast |
There was a problem hiding this comment.
The heading uses title-style capitalization ("Hourly Weather Forecast") but should use sentence-style capitalization according to the documentation standards. It should be "Hourly weather forecast".
| #### Hourly Weather Forecast | |
| #### Hourly weather forecast |
Proposed change
Add template weather forecast documentation
Type of change
currentbranch).currentbranch).nextbranch).nextbranch).Additional information
Checklist
currentbranch.nextbranch.