Skip to content

Commit

Permalink
Merge pull request #1831 from DaveDixon/pirate-patch
Browse files Browse the repository at this point in the history
code and docs for issue #1826
  • Loading branch information
acockburn committed Jun 28, 2023
2 parents f3a1229 + 48277ac commit 49eb372
Show file tree
Hide file tree
Showing 2 changed files with 164 additions and 5 deletions.
63 changes: 63 additions & 0 deletions appdaemon/widgets/pirateweather.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
widget_type: baseweather
fields:
title: ""
show_forecast: 0
prefer_icons: 0
unit: ""
wind_unit: ""
pressure_unit: ""
rain_unit: ""
temperature: ""
humidity: ""
precip_probability: ""
precip_intensity: ""
precip_type: ""
wind_speed: ""
pressure: ""
wind_bearing: ""
apparent_temperature: ""
icon: ""
bearing_icon: "mdi-rotate-0"
precip_type_icon: "mdi-umbrella"
forecast_title: ""
forecast_temperature_min: ""
forecast_temperature_max: ""
forecast_icon: ""
forecast_precip_probability: ""
forecast_precip_type: ""
forecast_precip_type_icon: "mdi-umbrella"
forecast_wind_speed: ""
forecast_wind_bearing: ""
forecast_bearing_icon: "mdi-rotate-0"
entities:
icon: sensor.pirateweather_icon
temperature: sensor.pirateweather_temperature
apparent_temperature: sensor.pirateweather_apparent_temperature
humidity: sensor.pirateweather_humidity
precip_probability: sensor.pirateweather_precip_probability
precip_intensity: sensor.pirateweather_precip_intensity
precip_type: sensor.pirateweather_precip
pressure: sensor.pirateweather_pressure
wind_speed: sensor.pirateweather_wind_speed
wind_bearing: sensor.pirateweather_wind_bearing
forecast_icon: sensor.pirateweather_icon_1d
forecast_temperature_min: sensor.pirateweather_overnight_low_temperature_1d
forecast_temperature_max: sensor.pirateweather_daytime_high_temperature_1d
forecast_precip_probability: sensor.pirateweather_precip_probability_1d
forecast_precip_type: sensor.pirateweather_precip_1d
forecast_wind_speed: sensor.pirateweather_wind_speed_1d
forecast_wind_bearing: sensor.pirateweather_wind_bearing_1d
css: []
static_css:
title_style: $weather_sub_style
unit_style: $weather_unit_style
main_style: $weather_main_style
sub_style: $weather_sub_style
sub_unit_style: $weather_sub_style
widget_style: $weather_widget_style
icons:
snow: mdi-snowflake
rain: mdi-umbrella
sleet: mdi-weather-snowy-rainy
unknown: mdi-umbrella
static_icons: []
106 changes: 101 additions & 5 deletions docs/DASHBOARD_CREATION.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1934,6 +1934,95 @@ Style Arguments:
- ``title2_style``
- ``state_text_style``


pirateweather
~~~~~~~~~~~~~
.. figure:: images/weather.png
:alt: pirateweather

Up to date weather reports. By default, it's configured to work with pirateweather
sensors. To use all the features, you need to add these sensors to the
``Monitored conditions`` option in the configuration for the Home Assistant
Pirate Weather integration:

- Icon
- Precipitation Type
- Precipitation Intensity
- Precipitation Probability
- Temperature
- Apparent Temperature
- Humidity
- Wind Speed
- Wind Bearing
- Pressure

To have the forecast displayed set ``show_forecast`` to 1. For it to work you
additionally need to add 1 to the ``Daily forecasts sensors`` option in the configuration
for the Home Assistant Pirate Weather integration. To use all the forecast features, you
need to add these sensors to monitored_conditions:

- Temperature High
- Temperature Low

.. code:: yaml
forecast:
- 1
Mandatory arguments:
^^^^^^^^^^^^^^^^^^^^

None

Optional Arguments:
^^^^^^^^^^^^^^^^^^^

- ``title``
- ``show_forecast`` - show the forecast
- ``prefer_icons`` - use icons instead of text
- ``forecast_title`` - title of the forecast if enabled
- ``sensors`` - list of sensors used by the widget

You can change the entities used by the widget by overwriting their values
in the ``sensors`` key in configuration.

Example with default values:

.. code:: yaml
sample_weather:
widget_type: weather
title: Today
show_forecast: 1
prefer_icons: 1
forecast_title: Tomorrow
sensors:
icon: sensor.pirateweather_icon
temperature: sensor.pirateweather_temperature
apparent_temperature: sensor.pirateweather_apparent_temperature
humidity: sensor.pirateweather_humidity
precip_probability: sensor.pirateweather_precip_probability
precip_intensity: sensor.pirateweather_precip_intensity
precip_type: sensor.pirateweather_precip
pressure: sensor.pirateweather_pressure
wind_speed: sensor.pirateweather_wind_speed
wind_bearing: sensor.pirateweather_wind_bearing
forecast_icon: sensor.pirateweather_icon_1
forecast_temperature_min: sensor.pirateweather_daily_low_temperature_1
forecast_temperature_max: sensor.pirateweather_daily_high_temperature_1
forecast_precip_probability: sensor.pirateweather_precip_probability_1
forecast_precip_type: sensor.pirateweather_precip_1
Style Arguments:
^^^^^^^^^^^^^^^^^^^

- ``widget_style``
- ``main_style``
- ``unit_style``
- ``sub_style``
- ``sub_unit_style``
- ``title_style``

radial
~~~~~~
.. figure:: images/radial.png
Expand Down Expand Up @@ -2309,8 +2398,6 @@ monitored_conditions:

- temperature
- apparent\_temperature
- temperature_min
- temperature_max
- humidity
- precip\_probability
- precip\_intensity
Expand All @@ -2321,14 +2408,23 @@ monitored_conditions:
- icon

To have the forecast displayed set ``show_forecast`` to 1. For it to work you
additionally, need to add the forecast option in dark_sky Home Assistant
configuration.
additionally need to add the forecast option in dark_sky Home Assistant
configuration:

.. code:: yaml
forecast:
- 1
To use all the forecast features, you need to add these
sensors to monitored_conditions:

- temperature_low
- temperature_high

Forecasts (1 day in the future) can be displayed for the weather icon, min
and max temperature, precipitation probability and precipitation type.

Mandatory arguments:
^^^^^^^^^^^^^^^^^^^^

Expand All @@ -2346,7 +2442,7 @@ Optional Arguments:
You can change the entities used by the widget by overwriting their values
in the ``sensors`` key in configuration.

Example with default values:
Example with default values plus wind forecast:

.. code:: yaml
Expand Down

0 comments on commit 49eb372

Please sign in to comment.