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
4 changes: 4 additions & 0 deletions PyViCare/PyViCareGateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

class Gateway(Device):

@handleNotSupported
def getSerial(self):
return self.service.getProperty("gateway.devices")["gatewayId"]
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At least my Heatbox1 / VitoconnectOpto1 has no device.serial data point. I requested it in the Viessmann community but no reply so far. So I get the serial from another data point.


@handleNotSupported
def getWifiSignalStrength(self):
return self.service.getProperty("gateway.wifi")["properties"]["strength"]["value"]
4 changes: 4 additions & 0 deletions tests/test_VitoconnectOpto1.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ def setUp(self):
self.service = ViCareServiceMock('response/VitoconnectOpto1.json')
self.device = Gateway(self.service)

def test_getSerial(self):
self.assertEqual(
self.device.getSerial(), "################")

def test_getWifiSignalStrength(self):
self.assertEqual(
self.device.getWifiSignalStrength(), -69)