Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions homeassistant/components/switch/vesync.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import homeassistant.helpers.config_validation as cv


REQUIREMENTS = ['pyvesync==0.1.1']
REQUIREMENTS = ['pyvesync_v2==0.9.6']

_LOGGER = logging.getLogger(__name__)

Expand All @@ -23,7 +23,7 @@

def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up the VeSync switch platform."""
from pyvesync.vesync import VeSync
from pyvesync_v2.vesync import VeSync

switches = []

Expand Down Expand Up @@ -104,5 +104,6 @@ def turn_off(self, **kwargs):
def update(self):
"""Handle data changes for node values."""
self.smartplug.update()
self._current_power_w = self.smartplug.get_power()
self._today_energy_kwh = self.smartplug.get_kwh_today()
if self.smartplug.devtype == 'outlet':
self._current_power_w = self.smartplug.get_power()
self._today_energy_kwh = self.smartplug.get_kwh_today()
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1427,7 +1427,7 @@ pyuptimerobot==0.0.5
pyvera==0.2.45

# homeassistant.components.switch.vesync
pyvesync==0.1.1
pyvesync_v2==0.9.6

# homeassistant.components.media_player.vizio
pyvizio==0.0.4
Expand Down