From 21d05a8b4d1d5dc3fb381a5fe5280d458b9e3f3c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Simon=20N=C3=B8rager=20S=C3=B8rensen?=
 <6843486+simse@users.noreply.github.com>
Date: Tue, 5 Jun 2018 19:13:16 +0200
Subject: [PATCH] Fixes an issue in Xiaomi TV platform that would some TVs not
 sleep correctly (#14829)

---
 homeassistant/components/media_player/xiaomi_tv.py | 4 ++--
 requirements_all.txt                               | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/homeassistant/components/media_player/xiaomi_tv.py b/homeassistant/components/media_player/xiaomi_tv.py
index be40bf7d010..d44ac138e41 100644
--- a/homeassistant/components/media_player/xiaomi_tv.py
+++ b/homeassistant/components/media_player/xiaomi_tv.py
@@ -13,7 +13,7 @@ from homeassistant.components.media_player import (
     SUPPORT_TURN_ON, SUPPORT_TURN_OFF, MediaPlayerDevice, PLATFORM_SCHEMA,
     SUPPORT_VOLUME_STEP)
 
-REQUIREMENTS = ['pymitv==1.0.0']
+REQUIREMENTS = ['pymitv==1.4.0']
 
 DEFAULT_NAME = "Xiaomi TV"
 
@@ -39,7 +39,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
 
     if host is not None:
         # Check if there's a valid TV at the IP address.
-        if not Discover().checkIp(host):
+        if not Discover().check_ip(host):
             _LOGGER.error(
                 "Could not find Xiaomi TV with specified IP: %s", host
             )
diff --git a/requirements_all.txt b/requirements_all.txt
index 87256c8eb7a..24c2df99ebb 100644
--- a/requirements_all.txt
+++ b/requirements_all.txt
@@ -884,7 +884,7 @@ pymailgunner==1.4
 pymediaroom==0.6.3
 
 # homeassistant.components.media_player.xiaomi_tv
-pymitv==1.0.0
+pymitv==1.4.0
 
 # homeassistant.components.mochad
 pymochad==0.2.0
-- 
GitLab