def test_has_group_address(self): """Test sensor has group address.""" xknx = XKNX() sensor = Sensor( xknx, "TestSensor", value_type="temperature", group_address_state="1/2/3" ) assert sensor.has_group_address(GroupAddress("1/2/3")) assert not sensor.has_group_address(GroupAddress("1/2/4"))
def test_has_group_address(self): """Test sensor has group address.""" xknx = XKNX(loop=self.loop) sensor = Sensor(xknx, 'TestSensor', value_type='temperature', group_address_state='1/2/3') self.assertTrue(sensor.has_group_address(GroupAddress('1/2/3'))) self.assertFalse(sensor.has_group_address(GroupAddress('1/2/4')))
def test_has_group_address(self): """Test sensor has group address.""" xknx = XKNX(loop=self.loop) sensor = Sensor( xknx, 'TestSensor', value_type='temperature', group_address_state='1/2/3') self.assertTrue(sensor.has_group_address(GroupAddress('1/2/3'))) self.assertFalse(sensor.has_group_address(GroupAddress('1/2/4')))