Пример #1
0
 def test_state_addresses(self):
     """Test expose sensor returns empty list as state addresses."""
     xknx = XKNX(loop=self.loop)
     sensor = Sensor(xknx,
                     'TestSensor',
                     value_type='temperature',
                     group_address='1/2/3')
     self.assertEqual(sensor.state_addresses(), [GroupAddress('1/2/3')])
Пример #2
0
 def test_state_addresses(self):
     """Test state addresses of sensor object."""
     xknx = XKNX(loop=self.loop)
     sensor = Sensor(xknx,
                     'TestSensor',
                     value_type='temperature',
                     group_address_state='1/2/3')
     self.assertEqual(sensor.state_addresses(), [GroupAddress('1/2/3')])
Пример #3
0
 def test_state_addresses_passive(self):
     """Test state addresses of passive sensor object."""
     xknx = XKNX(loop=self.loop)
     sensor = Sensor(xknx,
                     'TestSensor',
                     value_type='temperature',
                     group_address_state='1/2/3',
                     sync_state=False)
     self.assertEqual(sensor.state_addresses(), [])
Пример #4
0
 def test_state_addresses(self):
     """Test state addresses of sensor object."""
     xknx = XKNX(loop=self.loop)
     sensor = Sensor(
         xknx,
         'TestSensor',
         value_type='temperature',
         group_address_state='1/2/3')
     self.assertEqual(sensor.state_addresses(), [GroupAddress('1/2/3')])