Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/core/entity/weather.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Properties should always only return information from memory and not do I/O (lik
| native_apparent_temperature | float | `None` | The current apparent (feels-like) temperature in °C or °F.
| native_dew_point | float | `None` | The dew point temperature in °C or °F.
| native_precipitation_unit | string | `None` | The precipitation unit; mm or in.
| native_pressure | float | `None` | The current air pressure in hPa, mbar, inHg or mmHg.
| native_pressure_unit | string | `None` | The air pressure unit; hPa, mbar, inHg or mmHg. Required if native_pressure is set.
| native_pressure | float | `None` | The current air pressure in hPa, kPa, mbar, inHg or mmHg.
| native_pressure_unit | string | `None` | The air pressure unit; hPa, kPa, mbar, inHg or mmHg. Required if native_pressure is set.
| native_temperature | float | **Required** | The current temperature in °C or °F.
| native_temperature_unit | string | **Required** | The temperature unit; °C or °F.
| native_visibility | float | `None` | The current visibility in km or mi.
Expand Down Expand Up @@ -95,7 +95,7 @@ The integration should implement one or several of the async methods `async_fore
| native_apparent_temperature | float | `None` | The apparent (feels-like) temperature in °C or °F
| native_dew_point | float | `None` | The dew point temperature in °C or °F
| native_precipitation | float | `None` | The precipitation amount in mm or in.
| native_pressure | float | `None` | The air pressure in hPa, mbar, inHg or mmHg.
| native_pressure | float | `None` | The air pressure in hPa, kPa, mbar, inHg or mmHg.
| native_temperature | float | **Required** | The higher temperature in °C or °F
| native_templow | float | `None` | The lower daily Temperature in °C or °F
| native_wind_gust_speed | int | `None` | The wind gust speed in Beaufort, m/s, km/h, mi/h, ft/s or kn.
Expand Down Expand Up @@ -137,4 +137,4 @@ class MyWeatherEntity(WeatherEntity):

It is strongly recommended that fetched weather forecasts are cached by the weather entity to avoid unnecessary API accesses.

When an updated weather forecast is available, the weather forecast cache should be invalidated and the method `WeatherEntity.async_update_listeners` should be awaited to trigger a push of the updated weather forecast to any active subscriber. If there are active listeners, `WeatherEntity.async_update_listeners` will call the corresponding `async_forecast_xxx` methods. If there are no active listeners, `WeatherEntity.async_update_listeners` will not call any ot the `async_forecast_xxx` methods.
When an updated weather forecast is available, the weather forecast cache should be invalidated and the method `WeatherEntity.async_update_listeners` should be awaited to trigger a push of the updated weather forecast to any active subscriber. If there are active listeners, `WeatherEntity.async_update_listeners` will call the corresponding `async_forecast_xxx` methods. If there are no active listeners, `WeatherEntity.async_update_listeners` will not call any ot the `async_forecast_xxx` methods.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix typo in listener behavior sentence.

Line 140 says “any ot the async_forecast_xxx methods”; this should be “any of …”.

✏️ Proposed doc fix
-When an updated weather forecast is available, the weather forecast cache should be invalidated and the method `WeatherEntity.async_update_listeners` should be awaited to trigger a push of the updated weather forecast to any active subscriber. If there are active listeners, `WeatherEntity.async_update_listeners` will call the corresponding `async_forecast_xxx` methods. If there are no active listeners, `WeatherEntity.async_update_listeners` will not call any ot the `async_forecast_xxx` methods.
+When an updated weather forecast is available, the weather forecast cache should be invalidated and the method `WeatherEntity.async_update_listeners` should be awaited to trigger a push of the updated weather forecast to any active subscriber. If there are active listeners, `WeatherEntity.async_update_listeners` will call the corresponding `async_forecast_xxx` methods. If there are no active listeners, `WeatherEntity.async_update_listeners` will not call any of the `async_forecast_xxx` methods.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
When an updated weather forecast is available, the weather forecast cache should be invalidated and the method `WeatherEntity.async_update_listeners` should be awaited to trigger a push of the updated weather forecast to any active subscriber. If there are active listeners, `WeatherEntity.async_update_listeners` will call the corresponding `async_forecast_xxx` methods. If there are no active listeners, `WeatherEntity.async_update_listeners` will not call any ot the `async_forecast_xxx` methods.
When an updated weather forecast is available, the weather forecast cache should be invalidated and the method `WeatherEntity.async_update_listeners` should be awaited to trigger a push of the updated weather forecast to any active subscriber. If there are active listeners, `WeatherEntity.async_update_listeners` will call the corresponding `async_forecast_xxx` methods. If there are no active listeners, `WeatherEntity.async_update_listeners` will not call any of the `async_forecast_xxx` methods.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/core/entity/weather.md` at line 140, Fix the typo in the documentation
sentence: change "any ot the `async_forecast_xxx` methods" to "any of the
`async_forecast_xxx` methods" in the paragraph describing
WeatherEntity.async_update_listeners behavior so the sentence reads correctly
and references WeatherEntity.async_update_listeners and the async_forecast_xxx
methods.