Skip to content

Commit

Permalink
Upgrade luftdaten to 0.7.1 (home-assistant#60970)
Browse files Browse the repository at this point in the history
  • Loading branch information
frenck authored Dec 4, 2021
1 parent 1485020 commit b2ee62b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 10 deletions.
5 changes: 1 addition & 4 deletions homeassistant/components/luftdaten/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
)
from homeassistant.core import callback
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers.aiohttp_client import async_get_clientsession
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.dispatcher import async_dispatcher_send
from homeassistant.helpers.event import async_track_time_interval
Expand Down Expand Up @@ -175,11 +174,9 @@ async def async_setup_entry(hass, config_entry):
hass.async_create_task(hass.config_entries.async_remove(config_entry.entry_id))
return False

session = async_get_clientsession(hass)

try:
luftdaten = LuftDatenData(
Luftdaten(config_entry.data[CONF_SENSOR_ID], hass.loop, session),
Luftdaten(config_entry.data[CONF_SENSOR_ID]),
config_entry.data.get(CONF_SENSORS, {}).get(
CONF_MONITORED_CONDITIONS, SENSOR_KEYS
),
Expand Down
4 changes: 1 addition & 3 deletions homeassistant/components/luftdaten/config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
CONF_SHOW_ON_MAP,
)
from homeassistant.core import callback
from homeassistant.helpers import aiohttp_client
import homeassistant.helpers.config_validation as cv

from .const import CONF_SENSOR_ID, DEFAULT_SCAN_INTERVAL, DOMAIN
Expand Down Expand Up @@ -69,8 +68,7 @@ async def async_step_user(self, user_input=None):
if sensor_id in configured_sensors(self.hass):
return self._show_form({CONF_SENSOR_ID: "already_configured"})

session = aiohttp_client.async_get_clientsession(self.hass)
luftdaten = Luftdaten(user_input[CONF_SENSOR_ID], self.hass.loop, session)
luftdaten = Luftdaten(user_input[CONF_SENSOR_ID])
try:
await luftdaten.get_data()
valid = await luftdaten.validate_sensor()
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/luftdaten/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Luftdaten",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/luftdaten",
"requirements": ["luftdaten==0.6.5"],
"requirements": ["luftdaten==0.7.1"],
"codeowners": ["@fabaff"],
"quality_scale": "gold",
"iot_class": "cloud_polling"
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ logi_circle==0.2.2
london-tube-status==0.2

# homeassistant.components.luftdaten
luftdaten==0.6.5
luftdaten==0.7.1

# homeassistant.components.lupusec
lupupy==0.0.21
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ libsoundtouch==0.8
logi_circle==0.2.2

# homeassistant.components.luftdaten
luftdaten==0.6.5
luftdaten==0.7.1

# homeassistant.components.nmap_tracker
mac-vendor-lookup==0.1.11
Expand Down

0 comments on commit b2ee62b

Please sign in to comment.