def test_value_min(self): """Test parsing and streaming of DPTAngle 0°.""" assert DPTAngle.to_knx(0) == (0x00, ) assert DPTAngle.from_knx((0x00, )) == 0
def test_value_270_deg(self): """Test parsing and streaming of DPTAngle 270°.""" assert DPTAngle.to_knx(270) == (0xBF, ) assert DPTAngle.from_knx((0xBF, )) == 270
def test_value_max(self): """Test parsing and streaming of DPTAngle 360°.""" assert DPTAngle.to_knx(360) == (0xFF, ) assert DPTAngle.from_knx((0xFF, )) == 360
def test_value_30_deg(self): """Test parsing and streaming of DPTAngle 30°.""" assert DPTAngle.to_knx(30) == (0x15, ) assert DPTAngle.from_knx((0x15, )) == 30