Bump pysyncthru to 0.7.0 (#38832)
* Bump pysyncthru version to 0.7.0 This change includes a heavier refactoring, using a more reliable source for the device status and parsing display strings only for additional details * Fix test flow to ensure a status is set
This commit is contained in:
parent
72472cd11f
commit
fceba0bb88
5 changed files with 8 additions and 6 deletions
|
@ -3,7 +3,7 @@
|
|||
"name": "Samsung SyncThru Printer",
|
||||
"documentation": "https://www.home-assistant.io/integrations/syncthru",
|
||||
"config_flow": true,
|
||||
"requirements": ["pysyncthru==0.5.0", "url-normalize==1.4.1"],
|
||||
"requirements": ["pysyncthru==0.7.0", "url-normalize==1.4.1"],
|
||||
"ssdp": [
|
||||
{
|
||||
"deviceType": "urn:schemas-upnp-org:device:Printer:1",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import logging
|
||||
|
||||
from pysyncthru import SyncThru
|
||||
from pysyncthru import SYNCTHRU_STATE_HUMAN, SyncThru
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.sensor import PLATFORM_SCHEMA
|
||||
|
@ -101,7 +101,7 @@ class SyncThruSensor(Entity):
|
|||
|
||||
def __init__(self, syncthru, name):
|
||||
"""Initialize the sensor."""
|
||||
self.syncthru = syncthru
|
||||
self.syncthru: SyncThru = syncthru
|
||||
self._attributes = {}
|
||||
self._state = None
|
||||
self._name = name
|
||||
|
@ -164,7 +164,8 @@ class SyncThruMainSensor(SyncThruSensor):
|
|||
self.syncthru.url,
|
||||
)
|
||||
self._active = False
|
||||
self._state = self.syncthru.device_status()
|
||||
self._state = SYNCTHRU_STATE_HUMAN[self.syncthru.device_status()]
|
||||
self._attributes = {"display_text": self.syncthru.device_status_details()}
|
||||
|
||||
|
||||
class SyncThruTonerSensor(SyncThruSensor):
|
||||
|
|
|
@ -1668,7 +1668,7 @@ pysuez==0.1.17
|
|||
pysupla==0.0.3
|
||||
|
||||
# homeassistant.components.syncthru
|
||||
pysyncthru==0.5.0
|
||||
pysyncthru==0.7.0
|
||||
|
||||
# homeassistant.components.tankerkoenig
|
||||
pytankerkoenig==0.0.6
|
||||
|
|
|
@ -782,7 +782,7 @@ pyspcwebgw==0.4.0
|
|||
pysqueezebox==0.2.4
|
||||
|
||||
# homeassistant.components.syncthru
|
||||
pysyncthru==0.5.0
|
||||
pysyncthru==0.7.0
|
||||
|
||||
# homeassistant.components.ecobee
|
||||
python-ecobee-api==0.2.7
|
||||
|
|
|
@ -24,6 +24,7 @@ def mock_connection(aioclient_mock):
|
|||
text="""
|
||||
{
|
||||
\tstatus: {
|
||||
\thrDeviceStatus: 2,
|
||||
\tstatus1: " Sleeping... "
|
||||
\t},
|
||||
\tidentity: {
|
||||
|
|
Loading…
Add table
Reference in a new issue