Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump imgw_pib to version 1.0.9 and remove hydrological detail entities #134668

Merged
merged 8 commits into from
Jan 16, 2025

Conversation

bieniu
Copy link
Member

@bieniu bieniu commented Jan 4, 2025

Breaking change

Some hydrology data is no longer available to Home Assistant users via IMGW-PIB API and for this reason the following entities will be removed:

  • flood alarm binary sensor
  • flood alarm level sensor
  • flood warning binary sensor
  • flood warning level sensor

Proposed change

For few weeks, requests to one of the IMGW-PIB API endpoint (e.g. https://hydro-back.imgw.pl/station/hydro/status?id=154190050) have been receiving a 403 response. 403 is returned only when the HomeAssistant/ string is in the UserAgent.

curl -X GET "https://hydro-back.imgw.pl/station/hydro/status?id=154190050" -H "User-Agent: HomeAssistant/2025.2.0.dev0 aiohttp/3.11.11"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250"/>
<title>403 � Dost�p zabroniony: odmowa dost�pu.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
 <div class="content-container"><fieldset>
  <h2>403 - Forbidden: Access is denied.</h2>
  <h3>You do not have permission to view this directory or page using the credentials that you supplied.</h3>
 </fieldset></div>
</div>
</body>
</html>

Since this endpoint is not described as publicly available, I assume the API owner doesn't want Home Assistant users to use it. The data from this endpoint contains only part of the information that the integration needs, so I'm removing the entities associated with this data and this endpoint will no longer be used by the integration.

IMGW-PIB library changelog: bieniu/imgw-pib@1.0.7...1.0.9

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

@bieniu bieniu changed the title Bump imgw_pib to version 1.0.9 and remove Bump imgw_pib to version 1.0.9 and remove hydrological detail entities Jan 4, 2025
@bieniu bieniu marked this pull request as ready for review January 4, 2025 14:54
@frenck frenck merged commit b0d3aa1 into home-assistant:dev Jan 16, 2025
65 checks passed
@bieniu bieniu deleted the imgw-pib-1.0.8 branch January 16, 2025 23:18
@github-actions github-actions bot locked and limited conversation to collaborators Jan 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing IMGW-PIB entities
3 participants