mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 08:47:10 +00:00
Fix Vicare imports (#29071)
* fix import * Update water_heater.py * use ValueError * use ValueError
This commit is contained in:
parent
2cdd8ad15e
commit
1c73ac5df8
@ -1,7 +1,6 @@
|
||||
"""Viessmann ViCare climate device."""
|
||||
import logging
|
||||
import requests
|
||||
import simplejson
|
||||
|
||||
from homeassistant.components.climate import ClimateDevice
|
||||
from homeassistant.components.climate.const import (
|
||||
@ -169,7 +168,7 @@ class ViCareClimate(ClimateDevice):
|
||||
] = self._api.getReturnTemperature()
|
||||
except requests.exceptions.ConnectionError:
|
||||
_LOGGER.error("Unable to retrieve data from ViCare server")
|
||||
except simplejson.errors.JSONDecodeError:
|
||||
except ValueError:
|
||||
_LOGGER.error("Unable to decode data from ViCare server")
|
||||
|
||||
@property
|
||||
|
@ -1,7 +1,6 @@
|
||||
"""Viessmann ViCare water_heater device."""
|
||||
import logging
|
||||
import requests
|
||||
import simplejson
|
||||
|
||||
from homeassistant.components.water_heater import (
|
||||
SUPPORT_TARGET_TEMPERATURE,
|
||||
@ -93,7 +92,7 @@ class ViCareWater(WaterHeaterDevice):
|
||||
self._current_mode = self._api.getActiveMode()
|
||||
except requests.exceptions.ConnectionError:
|
||||
_LOGGER.error("Unable to retrieve data from ViCare server")
|
||||
except simplejson.errors.JSONDecodeError:
|
||||
except ValueError:
|
||||
_LOGGER.error("Unable to decode data from ViCare server")
|
||||
|
||||
@property
|
||||
|
Loading…
x
Reference in New Issue
Block a user