def test_state_addresses(self): """Test binary sensor returns state address as list.""" xknx = XKNX(loop=self.loop) binary_sensor = BinarySensor(xknx, 'TestInput', group_address_state='1/2/4') self.assertEqual(binary_sensor.state_addresses(), [GroupAddress('1/2/4')]) binary_sensor2 = BinarySensor(xknx, 'TestInput') self.assertEqual(binary_sensor2.state_addresses(), [])
def test_state_addresses(self): """Test expose sensor returns empty list as state addresses.""" xknx = XKNX(loop=self.loop) binary_sensor = BinarySensor(xknx, 'TestInput', group_address='1/2/3', group_address_state='1/2/4') self.assertEqual(binary_sensor.state_addresses(), [GroupAddress('1/2/4')])