{"id":13585876,"url":"https://github.com/cytech/Home-Assistant-wundergroundpws","last_synced_at":"2025-04-07T10:32:02.435Z","repository":{"id":35818264,"uuid":"175510969","full_name":"cytech/Home-Assistant-wundergroundpws","owner":"cytech","description":"Home Assistant custom component sensor for Weather Underground personal weather station users","archived":false,"fork":false,"pushed_at":"2024-02-23T16:37:08.000Z","size":773,"stargazers_count":222,"open_issues_count":4,"forks_count":76,"subscribers_count":30,"default_branch":"master","last_synced_at":"2024-02-23T17:40:58.622Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cytech.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-13T22:53:45.000Z","updated_at":"2024-07-05T18:07:54.247Z","dependencies_parsed_at":"2023-02-18T17:01:30.935Z","dependency_job_id":"cdbcca79-f646-4d78-802c-5b54a8d881f4","html_url":"https://github.com/cytech/Home-Assistant-wundergroundpws","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytech%2FHome-Assistant-wundergroundpws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytech%2FHome-Assistant-wundergroundpws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytech%2FHome-Assistant-wundergroundpws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cytech%2FHome-Assistant-wundergroundpws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cytech","download_url":"https://codeload.github.com/cytech/Home-Assistant-wundergroundpws/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247636873,"owners_count":20971020,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T15:05:11.792Z","updated_at":"2025-04-07T10:32:02.045Z","avatar_url":"https://github.com/cytech.png","language":"Python","funding_links":["https://paypal.me/cytecheng"],"categories":["Python"],"sub_categories":[],"readme":"# Home-Assistant-Wundergroundpws v2.X.X\n  \n\nHome Assistant custom integration for Weather Underground personal weather station users.  \nIncludes a native Home Assistant Weather Entity and a variety of weather sensors.  \nCurrent conditions are generated from the wundergroundpws configured station ID.  \nForecast is generated from the latitude/longitude retrieved from the wundergroundpws configured station ID.  \nThe `wundergroundpws` platform uses [Weather Underground](http://www.wunderground.com) as a source for current weather information.  \n\n:+1: If you find this software useful, feel free to make a donation: [Paypal.me Donation Link](https://paypal.me/cytecheng)  \n\n**v2.0.4 Upgrade notes:**  \n_requires Home Assistant version 2023.9 or greater._  \n_If the forecast is not displayed in the weather card after upgrading from v2.x.x to v2.0.4, edit the weather card in the dashboard and re-save it._  \n\n-------------------\n\n[Prerequisites](#installation-prerequisites)\n\n[Weather Underground PWS API Key](#weather-underground-pws-api-key)\n\n[Installation](#installation)\n\n[Upgrade](#upgrade)\n\n[Configure](#configure)\n\n[Description of terms and variables](#description-of-terms-and-variables)\n\n[Weather Entity](#weather-entity)\n\n[Statistics Card](#sensors-available-in-statistics)\n\n[Localization](#localization)\n\n# Installation Prerequisites\nPlease review the minimum requirements below to determine whether you will be able to\ninstall and use the software.\n\n- **_wundergroundpws v2.X.X is a redesigned integration and not an upgrade to earlier versions._**  \n  SEE [Upgrade](#upgrade) section for instructions.\n- wundergroundpws v2.X.X requires Home Assistant Version 2023.1 or greater\n- Registered and active Weather Underground personal weather station API key  \n[Back to top](#top) \n\n# Weather Underground PWS API Key\nFree API keys are only issued to registered and active Weather Underground personal weather station users.  \nTo use this integration, you need a Weather Underground personal weather station API key and Station ID.  \nTo get a free API key:  \n1) You must have a personal weather station registered and uploading data to Weather Underground.  \n    a) Join weather Underground  \n    b) Sign In  \n    c) My Profile -\u003e My Weather Stations  \n    d) Add a New PWS  \n2) get API key at  https://www.wunderground.com/member/api-keys.  \n\nPlease consider this when using the following information.  \n[Back to top](#top)\n\n\n# Installation\n\nDownload the latest v2.X.X release zip file from this repository.\nExtract the zip file to a temporary directory.\n-------\nCopy the custom_components directory from the extracted file into your .homeassistant directory.  \nor  \nCopy the contents of the custom_components directory from the extracted file into an existing custom_components directory in your .homeassistant directory.\n\n1. In Home Assistant Settings, select DEVICES \u0026 SERVICES, then ADD INTEGRATION.  \n2. Select the \"wundergroundpws\" integration.  \n3. Enter your Weather Underground API key and your Station ID (Case Sensitive. Must match the ID of your Wunderground device)  \nand submit.  \n4. After the integration setup is complete, you can select \"Configure\" to change:  \n\n* Create Forecast Sensors, numeric_precision (none or decimal), language, calendarday_temp, and override latitude and longitude for forecast.  \n* Observation and condition sensors will be created and enabled.  \n* Forecast sensors are not created by default. They will be created if you enable \"Create Forecast Sensors\" in the integration \"Configure\".  \n* Forecast sensors will then be created but are disabled. To enable, goto the integration - entities and select the sensors you would like and enable them.\n\nMultiple instances can be created by repeating the above steps with a different StationID and or/API Key.  \nNote that every instance requires it's own set of API calls, so be aware of exceeding the Weather Underground Personal API rate limit.  \nEach instance calls every 5 minutes or 288 times a day.  \n[Back to top](#top)\n\n# Upgrade\nThere is no upgrade to v2.x.x from earlier versions.  \nYou must:  \nDelete the existing custom_components/wundergroundpws directory.  \nRemove all configuration items for v1.1.x and earlier from configuration.yaml:  \n```yaml\n# REMOVE configuration.yaml entry\nwundergroundpws:\n  api_key: YOUR_API_KEY\n  pws_id: YOUR_STATION_ID\n\nweather:\n  - platform: wundergroundpws\n\nsensor:\n  - platform: wundergroundpws\n    monitored_conditions:\n      - temp\n      - dewpt\n      - heatIndex\n      - etc.. \n```\nRestart home assistant.  \nIn home assistant - settings - entities, search for \"wundergroundpws\" and select all filtered entities and \"remove selected\".  \nRestart home assistant.  \nInstall v2.x.x (See [Install](#installation) above).  \nReconfigure any lovelace cards, automations, scripts, etc to reflect new sensor names.  \n[Back to top](#top) \n\n# Configure\nWundergroundpws integration configuration options available at:  \nSettings-Devices \u0026 Services-Wundergroundpws-Configure  \n\n**OPTIONS:**  \n**Create Forecast Sensors?**  \nForecast sensors are not created by default. They will be created if you enable \"Create Forecast Sensors\" in the integration \"Configure\".  \nForecast sensors will then be created but are disabled. To enable, goto the integration - entities and select the sensors you would like and enable them.  \n\n**Numeric Precision**  \nnone (integer) or decimal (single).  \nOnly applies to PWS current values (not forecast) in sensors (not weather entity).\n\n**Language**  \nSpecify the language that the API returns.  \nThe default is English (en-US).\n\n**Temperature by Calendar Day?** (experimental)  \n**_USE AT YOUR OWN RISK_** - Undocumented in The Weather Company PWS observations API.  \nIf checked, retrieves Forecast temperature max/min relative to calendar day (12:00am -\u003e 11:59pm) as opposed to API period (~7:00am -\u003e ~6:59am).      \nOnly affects the weather entity forecast values, not the sensors.  \nThis field is undocumented in The Weather Company PWS API, so it is subject to change and if removed from API response in the future, will crash the integration if set true.\n\n**Latitude** - Default is retrieved from StationID  \nOverride Latitude coordinate for weather forecast.\n\n**Longitude** - Default is retrieved from StationID  \nOverride Longitude coordinate for weather forecast.  \n[Back to top](#top) \n        \n# Description of terms and variables\n```yaml\napi_key:\n  description: The API key for Weather Underground. See above for details.\n  required: true\n  type: string\npws_id:\n  description: You must enter a Personal Weather Station ID. \n               The station id will be used to display current weather conditions.  \n               Note - Case Sensitive. Must match the ID of your Wunderground device in member settings.\n  required: true\n  type: string\nnumeric_precision:\n  description: Optional - Show PWS data as integer or decimal.\n               Only applies to PWS current values (not forecast) in sensors (not weather entity).\n  required: false - Value of 'none' or 'decimal'\n  type: string\n  default: none\ncalendarday_temp:\n  USE AT YOUR OWN RISK - Undocumented in The Weather Company PWS observations API:\n  description: Optional - if true, retrieve Forecast temperature max/min relative  \n               to calendar day (12:00am -\u003e 11:59pm) as opposed to API period (~7:00am -\u003e ~6:59am).    \n               Only affects the weather entity forecast values, not the sensors.  \n               This field is undocumented in The Weather Company PWS API,  \n               so it is subject to change and if removed from API response in the future, will crash the integration if set true.\n  required: false - Value of 'true' or 'false'\n  type: boolean\n  default: false\nlang:\n  description: Specify the language that the API returns. The current list of all \n               Wunderground language codes is available  at \n               https://docs.google.com/document/d/13HTLgJDpsb39deFzk_YCQ5GoGoZCO_cRYzIxbwvgJLI/edit\n               or at the Localization bookmark below. \n               If not specified, it defaults to English (en-US).\n  required: false\n  type: string\n  default: en-US\nlatitude:\n  description: Latitude coordinate for weather forecast (required if **longitude** is specified).\n  required: false\n  type: string\n  default: WU API lat of stationId\nlongitude:\n  description: Longitude coordinate for weather forecast (required if **latitude** is specified).\n  required: false\n  type: string\n  default: WU API lon of stationId\n```\n# Available Sensors\n```yaml\n# description: Conditions to display in the frontend. The following conditions can be monitored.\n# See https://www.wunderground.com/about/data) for Weather Underground data information.\n#\n# Observations (current)\n neighborhood:\n   unique_id: \u003cpws_id\u003e,neighborhood\n   entity_id: sensor.\u003cpws_id\u003e_neighborhood\n   description: WU PWS reference name\n obsTimeLocal:\n   unique_id: \u003cpws_id\u003e,obstimelocal\n   entity_id: sensor.\u003cpws_id\u003e_local_observation_time   \n   description: Text summary of local observation time\n humidity:\n   unique_id: \u003cpws_id\u003e,humidity\n   entity_id: sensor.\u003cpws_id\u003e_relative_humidity   \n   description: Relative humidity    \n stationID:\n   unique_id: \u003cpws_id\u003e,stationid\n   entity_id: sensor.\u003cpws_id\u003e_station_id   \n   description: Your personal weather station (PWS) ID\n solarRadiation:\n   unique_id: \u003cpws_id\u003e,solarradiation\n   entity_id: sensor.\u003cpws_id\u003e_solar_radiation   \n   description: Current levels of solar radiation\n uv:\n   unique_id: \u003cpws_id\u003e,uv\n   entity_id: sensor.\u003cpws_id\u003e_uv_index   \n   description: Current levels of UV radiation.\n winddir:\n   unique_id: \u003cpws_id\u003e,winddir\n   entity_id: sensor.\u003cpws_id\u003e_wind_direction_degrees   \n   description: Wind degrees\n windDirectionCardinal:\n   unique_id: \u003cpws_id\u003e,winddirectioncardinal\n   entity_id: sensor.\u003cpws_id\u003e_wind_direction_cardinal   \n   description: Wind cardinal direction (N, NE, NNE, S, E, W, etc)\n# conditions (current)       \n dewpt:\n   unique_id: \u003cPWS_ID\u003e,dewpt\n   entity_id: sensor.\u003cpws_id\u003e_dewpoint\n   description: Temperature below which water droplets begin to condense and dew can form\n elev:\n   unique_id: \u003cpws_id\u003e,elev\n   entity_id: sensor.\u003cpws_id\u003e_elevation   \n   description: Elevation\n heatIndex:\n   unique_id: \u003cpws_id\u003e,heatindex\n   entity_id: sensor.\u003cpws_id\u003e_heat_index   \n   description: Heat index (combined effects of the temperature and humidity of the air)\n precipRate:\n   unique_id: \u003cpws_id\u003e,preciprate\n   entity_id: sensor.\u003cpws_id\u003e_precipitation_rate   \n   description: Rain intensity\n precipTotal:\n   unique_id: \u003cpws_id\u003e,preciptotal\n   entity_id: sensor.\u003cpws_id\u003e_precipitation_today   \n   description: Today Total precipitation\n pressure:\n   unique_id: \u003cpws_id\u003e,pressure\n   entity_id: sensor.\u003cpws_id\u003e_pressure   \n   description: Atmospheric air pressure\n temp:\n   unique_id: \u003cpws_id\u003e,temp\n   entity_id: sensor.\u003cpws_id\u003e_temperature   \n   description: Current temperature\n windChill:\n   unique_id: \u003cpws_id\u003e,windchill\n   entity_id: sensor.\u003cpws_id\u003e_wind_chill   \n   description: Wind Chill (combined effects of the temperature and wind)      \n windGust:\n   unique_id: \u003cpws_id\u003e,windgust\n   entity_id: sensor.\u003cpws_id\u003e_wind_gust   \n   description: Wind gusts speed\n windSpeed:\n   unique_id: \u003cpws_id\u003e,windspeed\n   entity_id: sensor.\u003cpws_id\u003e_wind_speed   \n   description: Current wind speed      \n#   Forecast\n narrative:\n   unique_id: \u003cPWS_ID\u003e,narrative_\u003cday\u003ef\n   entity_id: sensor.\u003cpws_id\u003e_weather_summary_\u003cday\u003e\n   description: A human-readable weather forecast for Day. (\u003cday\u003e Variations 0, 1, 2, 3, 4)\n qpfSnow:\n   unique_id: \u003cpws_id\u003e,qpfsnow_\u003cday\u003ef\n   entity_id: sensor.\u003cpws_id\u003e_snow_amount_\u003cday\u003e\n   description: Forecasted snow intensity. (\u003cday\u003e Variations 0, 1, 2, 3, 4)\n#   Forecast daypart\n narrative:\n   unique_id: \u003cPWS_ID\u003e,narrative_\u003cdaypart\u003efdp\n   entity_id: sensor.\u003cpws_id\u003e_forecast_summary_\u003csuffix\u003e\n   description: A human-readable weather forecast for Day. (suffix Variations 0d, 1n, 2d, 3n, 4d, 5n, 6d, 7n, 8d, 9n)\n qpf:\n   unique_id: \u003cpws_id\u003e,qpf_\u003cdaypart\u003efdp\n   entity_id: sensor.\u003cpws_id\u003e_precipitation_amount_\u003csuffix\u003e\n   description: Forecasted precipitation intensity. (suffix Variations 0d, 1n, 2d, 3n, 4d, 5n, 6d, 7n, 8d, 9n)\n precipChance:\n   unique_id: \u003cpws_id\u003e,precipchance_\u003cdaypart\u003efdp\n   entity_id: sensor.\u003cpws_id\u003e_precipitation_probability_\u003csuffix\u003e\n   description: Forecasted precipitation probability in %. (suffix Variations 0d, 1n, 2d, 3n, 4d, 5n, 6d, 7n, 8d, 9n)      \n temperature:\n   unique_id: \u003cpws_id\u003e,temperature\u003cdaypart\u003efdp\n   entity_id: sensor.\u003cpws_id\u003e_forecast_temperature_\u003csuffix\u003e\n   description: Forecasted temperature. (suffix Variations 0d, 1n, 2d, 3n, 4d, 5n, 6d, 7n, 8d, 9n)\n windSpeed:\n   unique_id: \u003cpws_id\u003e,windspeed_\u003cdaypart\u003efdp\n   entity_id: sensor.\u003cpws_id\u003e_average_wind_\u003csuffix\u003e\n   description: Forecasted wind speed. (suffix Variations 0d, 1n, 2d, 3n, 4d, 5n, 6d, 7n, 8d, 9n)\n```\n\nAll the conditions listed above will be updated every 5 minutes.  \n\n**_Wunderground API caveat:   \nThe daypart object as well as the temperatureMax field OUTSIDE of the daypart object will appear as null in the API after 3:00pm Local Apparent Time.  \nThe affected sensors will return as \"Today Expired\" with a value of \"Unknown\" when this condition is met._**\n\n\nVariations above marked with \"#d\" are daily forecasts.\nVariations above marked with \"#n\" are nightly forecasts.\n\n\nNote: While the platform is called “wundergroundpws” the sensors will show up in Home Assistant as  \n```sensor.\u003cpws_id\u003e_forecast_temperature_\u003csuffix\u003e```  \n(eg: sensor.samplepwsid_forecast_temperature_0d).\n\n\n[//]: # (Note that the Weather Underground sensor is added to the entity_registry, so second and subsequent Personal Weather Station ID \u0026#40;pws_id\u0026#41; will have their monitored conditions suffixed with an index number e.g.)\n\n[//]: # ()\n[//]: # (```yaml)\n\n[//]: # (    - sensor.wupws_weather_1d_metric_2)\n\n[//]: # (```)\nAdditional details about the API are available [here](https://docs.google.com/document/d/1eKCnKXI9xnoMGRRzOL1xPCBihNV2rOet08qpE_gArAY/edit).  \n[Back to top](#top)\n\n# Weather Entity\nwundergroundpws data returned to weather entity (HASS weather forecast card):  \nCurrent:\n- temperature\n- pressure\n- humidity\n- wind_speed\n- wind_bearing\n\nForecast:\n- datetime\n- temperature (max)\n- temperature (low)\n- condition (icon)\n- precipitation\n- precipitation_probability\n- wind_bearing\n- wind_speed\n\ntemplates can be created to access these values such as:\n```\n{% for state in states.weather -%}\n  {%- if loop.first %}The {% elif loop.last %} and the {% else %}, the {% endif -%}\n  {{ state.name | lower }} is {{state.state_with_unit}}\n{%- endfor %}.\n\nWind is {{ states.weather.\u003cSTATIONID\u003e.attributes.forecast[0].wind_bearing }} at {{ states.weather.\u003cSTATIONID\u003e.attributes.forecast[0].wind_speed }} {{ states.weather.\u003cSTATIONID\u003e.attributes.wind_speed_unit }}\n\n```\n[Back to top](#top)\n\n# Sensors available in statistics\nThe following are wundergroundpws sensors exposed to the statistics card in Lovelace.  \nNote that only sensors of like units can be combined in a single card.  \n\n* **class NONE**\n* sensor.samplepwsid_uv_index\n* \n* **class DEGREE**\n* sensor.sensor.samplepwsid_wind_direction_degrees\n\n* \n* **class RATE \u0026 SPEED**\n* sensor.samplepwsid_precipitation_rate\n* sensor.samplepwsid_wind_gust\n* sensor.samplepwsid_wind_speed\n* \n* **class LENGTH**\n* sensor.samplepwsid_precipitation_today\n* \n* **class PRESSURE**\n* sensor.samplepwsid_pressure\n* \n* **class HUMIDITY**\n* sensor.samplepwsid_relative_humidity\n* \n* **class IRRADIANCE**\n* sensor.samplepwsid_solar_radiation\n* \n* **class TEMPERATURE**\n* sensor.samplepwsid_dewpoint\n* sensor.samplepwsid_heat_index\n* sensor.samplepwsid_wind_chill\n* sensor.samplepwsid_temperature\n\n[Back to top](#top)\n\n\n# Localization\n\nSensor \"friendly names\" are set via translation files.  \nWundergroundpws translation files are located in the 'wundergroundpws/wupws_translations' directory.\nFiles were translated, using 'en.json' as the base, via https://translate.i18next.com.  \nTranslations only use the base language code and not the variant (i.e. zh-CN/zh-HK/zh-TW uses zh).  \nThe default is en-US (translations/en.json) if the lang: option is not set in the wundergroundpws config.  \nIf lang: is set (i.e.  lang: de-DE), then the translations/de.json file is loaded, and the Weather Underground API is queried with de-DE.    \nThe translation file applies to all sensor friendly names.   \nForecast-narrative, forecast-dayOfWeek, forecast-daypart-narrative and forecast-daypart-daypartName are translated by the api. \nAvailable lang: options are:  \n```\n'am-ET', 'ar-AE', 'az-AZ', 'bg-BG', 'bn-BD', 'bn-IN', 'bs-BA', 'ca-ES', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-GB',\n'en-IN', 'en-US', 'es-AR', 'es-ES', 'es-LA', 'es-MX', 'es-UN', 'es-US', 'et-EE', 'fa-IR', 'fi-FI', 'fr-CA', 'fr-FR',\n'gu-IN', 'he-IL', 'hi-IN', 'hr-HR', 'hu-HU', 'in-ID', 'is-IS', 'it-IT', 'iw-IL', 'ja-JP', 'jv-ID', 'ka-GE', 'kk-KZ',\n'km-KH', 'kn-IN', 'ko-KR', 'lo-LA', 'lt-LT', 'lv-LV', 'mk-MK', 'mn-MN', 'mr-IN', 'ms-MY', 'my-MM', 'ne-IN', 'ne-NP',\n'nl-NL', 'no-NO', 'om-ET', 'pa-IN', 'pa-PK', 'pl-PL', 'pt-BR', 'pt-PT', 'ro-RO', 'ru-RU', 'si-LK', 'sk-SK', 'sl-SI',\n'sq-AL', 'sr-BA', 'sr-ME', 'sr-RS', 'sv-SE', 'sw-KE', 'ta-IN', 'ta-LK', 'te-IN', 'ti-ER', 'ti-ET', 'tg-TJ', 'th-TH',\n'tk-TM', 'tl-PH', 'tr-TR', 'uk-UA', 'ur-PK', 'uz-UZ', 'vi-VN', 'zh-CN', 'zh-HK', 'zh-TW'\n```\nWeather Entity (hass weather card) translations are handled by Home Assistant and configured under the user -\u003e language setting.  \n[Back to top](#top)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcytech%2FHome-Assistant-wundergroundpws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcytech%2FHome-Assistant-wundergroundpws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcytech%2FHome-Assistant-wundergroundpws/lists"}